From: Andrew Morton Signed-off-by: Andrew Morton --- fs/locks.c | 54 --------------------------------------------------- 1 file changed, 54 deletions(-) diff -puN fs/locks.c~git-nfs-server-cluster-locking-api-fixup fs/locks.c --- a/fs/locks.c~git-nfs-server-cluster-locking-api-fixup +++ a/fs/locks.c @@ -1598,59 +1598,6 @@ asmlinkage long sys_flock(unsigned int f return error; } -<<<<<<< HEAD/fs/locks.c -/** - * vfs_test_lock - test file byte range lock - * @filp: The file to test lock for - * @fl: The lock to test - * @conf: Place to return a copy of the conflicting lock, if found - * - * Returns -ERRNO on failure. Indicates presence of conflicting lock by - * setting conf->fl_type to something other than F_UNLCK. - */ -int vfs_test_lock(struct file *filp, struct file_lock *fl) -{ - if (filp->f_op && filp->f_op->lock) - return filp->f_op->lock(filp, F_GETLK, fl); - posix_test_lock(filp, fl); - return 0; -} -EXPORT_SYMBOL_GPL(vfs_test_lock); - -static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) -{ - flock->l_pid = fl->fl_pid; -#if BITS_PER_LONG == 32 - /* - * Make sure we can represent the posix lock via - * legacy 32bit flock. - */ - if (fl->fl_start > OFFT_OFFSET_MAX) - return -EOVERFLOW; - if (fl->fl_end != OFFSET_MAX && fl->fl_end > OFFT_OFFSET_MAX) - return -EOVERFLOW; -#endif - flock->l_start = fl->fl_start; - flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : - fl->fl_end - fl->fl_start + 1; - flock->l_whence = 0; - flock->l_type = fl->fl_type; - return 0; -} - -#if BITS_PER_LONG == 32 -static void posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl) -{ - flock->l_pid = fl->fl_pid; - flock->l_start = fl->fl_start; - flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : - fl->fl_end - fl->fl_start + 1; - flock->l_whence = 0; - flock->l_type = fl->fl_type; -} -#endif - -======= /** * vfs_test_lock - test file byte range lock * @filp: The file to test lock for @@ -1701,7 +1648,6 @@ static void posix_lock_to_flock64(struct } #endif ->>>>>>> /fs/locks.c /* Report the first existing lock that would conflict with l. * This implements the F_GETLK command of fcntl(). */ _