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>
This commit is contained in:
Steve Dickson 2007-11-08 04:05:04 -05:00 committed by Trond Myklebust
parent 2f74c0a056
commit ef818a28fa
5 changed files with 39 additions and 0 deletions

View file

@ -14,6 +14,8 @@
#include <linux/sched.h>
#include <linux/wait.h>
#include "internal.h"
struct nfs_unlinkdata {
struct hlist_node list;
struct nfs_removeargs args;
@ -113,6 +115,7 @@ static void nfs_async_unlink_release(void *calldata)
struct nfs_unlinkdata *data = calldata;
nfs_dec_sillycount(data->dir);
nfs_sb_deactive(NFS_SERVER(data->dir));
nfs_free_unlinkdata(data);
}
@ -153,6 +156,7 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n
nfs_dec_sillycount(dir);
return 0;
}
nfs_sb_active(NFS_SERVER(dir));
data->args.fh = NFS_FH(dir);
nfs_fattr_init(&data->res.dir_attr);