|
@@ -779,6 +779,7 @@ nlmsvc_grant_blocked(struct nlm_block *block)
|
|
struct nlm_file *file = block->b_file;
|
|
struct nlm_file *file = block->b_file;
|
|
struct nlm_lock *lock = &block->b_call->a_args.lock;
|
|
struct nlm_lock *lock = &block->b_call->a_args.lock;
|
|
int error;
|
|
int error;
|
|
|
|
+ loff_t fl_start, fl_end;
|
|
|
|
|
|
dprintk("lockd: grant blocked lock %p\n", block);
|
|
dprintk("lockd: grant blocked lock %p\n", block);
|
|
|
|
|
|
@@ -796,9 +797,16 @@ nlmsvc_grant_blocked(struct nlm_block *block)
|
|
}
|
|
}
|
|
|
|
|
|
/* Try the lock operation again */
|
|
/* Try the lock operation again */
|
|
|
|
+ /* vfs_lock_file() can mangle fl_start and fl_end, but we need
|
|
|
|
+ * them unchanged for the GRANT_MSG
|
|
|
|
+ */
|
|
lock->fl.fl_flags |= FL_SLEEP;
|
|
lock->fl.fl_flags |= FL_SLEEP;
|
|
|
|
+ fl_start = lock->fl.fl_start;
|
|
|
|
+ fl_end = lock->fl.fl_end;
|
|
error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL);
|
|
error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL);
|
|
lock->fl.fl_flags &= ~FL_SLEEP;
|
|
lock->fl.fl_flags &= ~FL_SLEEP;
|
|
|
|
+ lock->fl.fl_start = fl_start;
|
|
|
|
+ lock->fl.fl_end = fl_end;
|
|
|
|
|
|
switch (error) {
|
|
switch (error) {
|
|
case 0:
|
|
case 0:
|