diff options
author | Steve Dickson <SteveD@redhat.com> | 2007-11-08 04:05:04 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:24 -0500 |
commit | ef818a28fac9bd214e676986d8301db0582b92a9 (patch) | |
tree | b1825d1ecdfa6b35951a61f6bc54363236c12cd0 /fs/nfs/unlink.c | |
parent | 2f74c0a05612b9c2014b5b67833dba9b9f523948 (diff) |
NFS: Stop sillyname renames and unmounts from racing
Added an active/deactive mechanism to the nfs_server structure
allowing async operations to hold off umount until the
operations are done.
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r-- | fs/nfs/unlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 431981d0265f..8e5428e0b86f 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | 16 | ||
17 | #include "internal.h" | ||
18 | |||
17 | struct nfs_unlinkdata { | 19 | struct nfs_unlinkdata { |
18 | struct hlist_node list; | 20 | struct hlist_node list; |
19 | struct nfs_removeargs args; | 21 | struct nfs_removeargs args; |
@@ -113,6 +115,7 @@ static void nfs_async_unlink_release(void *calldata) | |||
113 | struct nfs_unlinkdata *data = calldata; | 115 | struct nfs_unlinkdata *data = calldata; |
114 | 116 | ||
115 | nfs_dec_sillycount(data->dir); | 117 | nfs_dec_sillycount(data->dir); |
118 | nfs_sb_deactive(NFS_SERVER(data->dir)); | ||
116 | nfs_free_unlinkdata(data); | 119 | nfs_free_unlinkdata(data); |
117 | } | 120 | } |
118 | 121 | ||
@@ -153,6 +156,7 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n | |||
153 | nfs_dec_sillycount(dir); | 156 | nfs_dec_sillycount(dir); |
154 | return 0; | 157 | return 0; |
155 | } | 158 | } |
159 | nfs_sb_active(NFS_SERVER(dir)); | ||
156 | data->args.fh = NFS_FH(dir); | 160 | data->args.fh = NFS_FH(dir); |
157 | nfs_fattr_init(&data->res.dir_attr); | 161 | nfs_fattr_init(&data->res.dir_attr); |
158 | 162 | ||