]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: set correct fl_len in nlmclnt_test()
authorFelix Blyakher <felixb@sgi.com>
Tue, 15 Jul 2008 17:40:22 +0000 (12:40 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 15 Jul 2008 22:08:59 +0000 (18:08 -0400)
commitdb0e0ba691c1fed6538ea1d34fedf044584dc695
tree69bec2c4fcabba993fea54f9d3be26963f9f13ce
parent77f42f1dce5ee75e8a3cb98fe8da43cf35af544a
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>
fs/lockd/clntproc.c