diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-18 12:09:09 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-18 12:09:09 -0500 |
| commit | 51d52b26e1d88ce79f1053f1b0f7f4d43a98d26d (patch) | |
| tree | fe0d213a91f49fd4340728a4f5bf34f60e3fba8c /fs/lockd/svclock.c | |
| parent | c600558668e4ebd0fab6bf1d90baaf95bc43f9d5 (diff) | |
| parent | 6d0abeca3242a88cab8232e4acd7e2bf088f3bc2 (diff) | |
Merge 3.14-rc3 into tty-next
This is for the fixes in that release, we want them here too.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/lockd/svclock.c')
| -rw-r--r-- | fs/lockd/svclock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index e066a3902973..ab798a88ec1d 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
| @@ -779,6 +779,7 @@ nlmsvc_grant_blocked(struct nlm_block *block) | |||
| 779 | struct nlm_file *file = block->b_file; | 779 | struct nlm_file *file = block->b_file; |
| 780 | struct nlm_lock *lock = &block->b_call->a_args.lock; | 780 | struct nlm_lock *lock = &block->b_call->a_args.lock; |
| 781 | int error; | 781 | int error; |
| 782 | loff_t fl_start, fl_end; | ||
| 782 | 783 | ||
| 783 | dprintk("lockd: grant blocked lock %p\n", block); | 784 | dprintk("lockd: grant blocked lock %p\n", block); |
| 784 | 785 | ||
| @@ -796,9 +797,16 @@ nlmsvc_grant_blocked(struct nlm_block *block) | |||
| 796 | } | 797 | } |
| 797 | 798 | ||
| 798 | /* Try the lock operation again */ | 799 | /* Try the lock operation again */ |
| 800 | /* vfs_lock_file() can mangle fl_start and fl_end, but we need | ||
| 801 | * them unchanged for the GRANT_MSG | ||
| 802 | */ | ||
| 799 | lock->fl.fl_flags |= FL_SLEEP; | 803 | lock->fl.fl_flags |= FL_SLEEP; |
| 804 | fl_start = lock->fl.fl_start; | ||
| 805 | fl_end = lock->fl.fl_end; | ||
| 800 | error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL); | 806 | error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL); |
| 801 | lock->fl.fl_flags &= ~FL_SLEEP; | 807 | lock->fl.fl_flags &= ~FL_SLEEP; |
| 808 | lock->fl.fl_start = fl_start; | ||
| 809 | lock->fl.fl_end = fl_end; | ||
| 802 | 810 | ||
| 803 | switch (error) { | 811 | switch (error) { |
| 804 | case 0: | 812 | case 0: |
