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:
committed by
Trond Myklebust
parent
2f74c0a056
commit
ef818a28fa
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user