aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2008-07-15 13:40:22 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-15 18:08:59 -0400
commitd67d1c7bf948341fd8678c8e337ec27f4b46b206 (patch)
tree69bec2c4fcabba993fea54f9d3be26963f9f13ce /fs
parentc2e1b09ff237c0a3687b9a804cc8bf489743cffc (diff)
nfs: set correct fl_len in nlmclnt_test()
fcntl(F_GETLK) on an nfs client incorrectly returns the values for the conflicting lock. fl_len value is always 1. If the conflicting lock is (0, 4095) the F_GETLK request for (1024, 10) returns (0, 1), which doesn't even cover the requested range, and is quite confusing. The fix is trivial, set fl_end from the fl_end value recieved from the nfs server. Signed-off-by: Felix Blyakher <felixb@sgi.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/lockd/clntproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 5df517b81f3f..fd7d4669776e 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -430,7 +430,7 @@ nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl)
430 * Report the conflicting lock back to the application. 430 * Report the conflicting lock back to the application.
431 */ 431 */
432 fl->fl_start = req->a_res.lock.fl.fl_start; 432 fl->fl_start = req->a_res.lock.fl.fl_start;
433 fl->fl_end = req->a_res.lock.fl.fl_start; 433 fl->fl_end = req->a_res.lock.fl.fl_end;
434 fl->fl_type = req->a_res.lock.fl.fl_type; 434 fl->fl_type = req->a_res.lock.fl.fl_type;
435 fl->fl_pid = 0; 435 fl->fl_pid = 0;
436 break; 436 break;