diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:18:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:18:27 -0500 |
commit | 53846a21c1766326bb14ce8ab6e997a0c120675d (patch) | |
tree | 37b04485e29844b4e734479181276a2f4d2447e4 /fs/nfsd | |
parent | 2e9abdd9bad485970b37cd53a82f92702054984c (diff) | |
parent | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (diff) |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits)
SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies
SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc
LOCKD: Make nlmsvc_traverse_shares return void
LOCKD: nlmsvc_traverse_blocks return is unused
SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers.
NFSv4: Dont list system.nfs4_acl for filesystems that don't support it.
SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum
SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release()
SUNRPC: Fix memory barriers for req->rq_received
NFS: Fix a race in nfs_sync_inode()
NFS: Clean up nfs_flush_list()
NFS: Fix a race with PG_private and nfs_release_page()
NFSv4: Ensure the callback daemon flushes signals
SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs
NFS, NLM: Allow blocking locks to respect signals
NFS: Make nfs_fhget() return appropriate error values
NFSv4: Fix an oops in nfs4_fill_super
lockd: blocks should hold a reference to the nlm_file
NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
NFSv4: Send the delegation stateid for SETATTR calls
...
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 2 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 8d3d23c8a4d2..c872bd07fc10 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -326,6 +326,8 @@ out: | |||
326 | .p_encode = (kxdrproc_t) nfs4_xdr_##argtype, \ | 326 | .p_encode = (kxdrproc_t) nfs4_xdr_##argtype, \ |
327 | .p_decode = (kxdrproc_t) nfs4_xdr_##restype, \ | 327 | .p_decode = (kxdrproc_t) nfs4_xdr_##restype, \ |
328 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ | 328 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ |
329 | .p_statidx = NFSPROC4_CB_##call, \ | ||
330 | .p_name = #proc, \ | ||
329 | } | 331 | } |
330 | 332 | ||
331 | static struct rpc_procinfo nfs4_cb_procedures[] = { | 333 | static struct rpc_procinfo nfs4_cb_procedures[] = { |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1143cfb64549..f6ab762bea99 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2639,7 +2639,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2639 | struct nfs4_stateid *lock_stp; | 2639 | struct nfs4_stateid *lock_stp; |
2640 | struct file *filp; | 2640 | struct file *filp; |
2641 | struct file_lock file_lock; | 2641 | struct file_lock file_lock; |
2642 | struct file_lock *conflock; | 2642 | struct file_lock conflock; |
2643 | int status = 0; | 2643 | int status = 0; |
2644 | unsigned int strhashval; | 2644 | unsigned int strhashval; |
2645 | 2645 | ||
@@ -2775,11 +2775,11 @@ conflicting_lock: | |||
2775 | /* XXX There is a race here. Future patch needed to provide | 2775 | /* XXX There is a race here. Future patch needed to provide |
2776 | * an atomic posix_lock_and_test_file | 2776 | * an atomic posix_lock_and_test_file |
2777 | */ | 2777 | */ |
2778 | if (!(conflock = posix_test_lock(filp, &file_lock))) { | 2778 | if (!posix_test_lock(filp, &file_lock, &conflock)) { |
2779 | status = nfserr_serverfault; | 2779 | status = nfserr_serverfault; |
2780 | goto out; | 2780 | goto out; |
2781 | } | 2781 | } |
2782 | nfs4_set_lock_denied(conflock, &lock->lk_denied); | 2782 | nfs4_set_lock_denied(&conflock, &lock->lk_denied); |
2783 | out: | 2783 | out: |
2784 | if (status && lock->lk_is_new && lock_sop) | 2784 | if (status && lock->lk_is_new && lock_sop) |
2785 | release_stateowner(lock_sop); | 2785 | release_stateowner(lock_sop); |
@@ -2800,7 +2800,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2800 | struct inode *inode; | 2800 | struct inode *inode; |
2801 | struct file file; | 2801 | struct file file; |
2802 | struct file_lock file_lock; | 2802 | struct file_lock file_lock; |
2803 | struct file_lock *conflicting_lock; | 2803 | struct file_lock conflock; |
2804 | int status; | 2804 | int status; |
2805 | 2805 | ||
2806 | if (nfs4_in_grace()) | 2806 | if (nfs4_in_grace()) |
@@ -2864,10 +2864,9 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock | |||
2864 | file.f_dentry = current_fh->fh_dentry; | 2864 | file.f_dentry = current_fh->fh_dentry; |
2865 | 2865 | ||
2866 | status = nfs_ok; | 2866 | status = nfs_ok; |
2867 | conflicting_lock = posix_test_lock(&file, &file_lock); | 2867 | if (posix_test_lock(&file, &file_lock, &conflock)) { |
2868 | if (conflicting_lock) { | ||
2869 | status = nfserr_denied; | 2868 | status = nfserr_denied; |
2870 | nfs4_set_lock_denied(conflicting_lock, &lockt->lt_denied); | 2869 | nfs4_set_lock_denied(&conflock, &lockt->lt_denied); |
2871 | } | 2870 | } |
2872 | out: | 2871 | out: |
2873 | nfs4_unlock_state(); | 2872 | nfs4_unlock_state(); |