diff options
author | Marc Eshel <eshel@almaden.ibm.com> | 2007-02-21 00:55:18 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2007-05-06 17:39:00 -0400 |
commit | 9d6a8c5c213e34c475e72b245a8eb709258e968c (patch) | |
tree | 96110535c2bd9485129c0753a9e0f012083b220f /fs/nfsd/nfs4state.c | |
parent | 70cc6487a4e08b8698c0e2ec935fb48d10490162 (diff) | |
download | op-kernel-dev-9d6a8c5c213e34c475e72b245a8eb709258e968c.zip op-kernel-dev-9d6a8c5c213e34c475e72b245a8eb709258e968c.tar.gz |
locks: give posix_test_lock same interface as ->lock
posix_test_lock() and ->lock() do the same job but have gratuitously
different interfaces. Modify posix_test_lock() so the two agree,
simplifying some code in the process.
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index af36070..e42c7a0 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2813,7 +2813,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct inode *inode; struct file file; struct file_lock file_lock; - struct file_lock conflock; __be32 status; if (nfs4_in_grace()) @@ -2878,9 +2877,10 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, file.f_path.dentry = cstate->current_fh.fh_dentry; status = nfs_ok; - if (posix_test_lock(&file, &file_lock, &conflock)) { + posix_test_lock(&file, &file_lock); + if (file_lock.fl_type != F_UNLCK) { status = nfserr_denied; - nfs4_set_lock_denied(&conflock, &lockt->lt_denied); + nfs4_set_lock_denied(&file_lock, &lockt->lt_denied); } out: nfs4_unlock_state(); |