mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
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:
parent
2f74c0a056
commit
ef818a28fa
5 changed files with 39 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue