aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-05 10:31:33 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:24 -0400
commit4a35bd41aff5714deb41c8f14766df3871e2e8f7 (patch)
tree3542c76b1e0aabcd0ee6bb76fdd8228e6f3b5479 /fs/nfs/nfs4state.c
parentad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1 (diff)
downloadkernel_samsung_smdk4412-4a35bd41aff5714deb41c8f14766df3871e2e8f7.zip
kernel_samsung_smdk4412-4a35bd41aff5714deb41c8f14766df3871e2e8f7.tar.gz
kernel_samsung_smdk4412-4a35bd41aff5714deb41c8f14766df3871e2e8f7.tar.bz2
NFSv4: Ensure that nfs4_do_close() doesn't race with umount
nfs4_do_close() does not currently have any way to ensure that the user won't attempt to unmount the partition while the asynchronous RPC call is completing. This again may cause Oopses in nfs_update_inode(). Add a vfsmount argument to nfs4_close_state to ensure that the partition remains mounted while we're closing the file. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 8ed79d5..a85138e 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -341,7 +341,7 @@ void nfs4_put_open_state(struct nfs4_state *state)
/*
* Close the current file.
*/
-void nfs4_close_state(struct nfs4_state *state, mode_t mode)
+void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode)
{
struct inode *inode = state->inode;
struct nfs4_state_owner *owner = state->owner;
@@ -375,7 +375,7 @@ void nfs4_close_state(struct nfs4_state *state, mode_t mode)
spin_unlock(&inode->i_lock);
spin_unlock(&owner->so_lock);
- if (oldstate != newstate && nfs4_do_close(inode, state) == 0)
+ if (oldstate != newstate && nfs4_do_close(path, state) == 0)
return;
nfs4_put_open_state(state);
nfs4_put_state_owner(owner);