aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-17 17:31:57 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-09-17 17:31:57 -0400
commitd3d4152a5d59af9e13a73efa9e9c24383fbe307f (patch)
tree552ea5586bb64f8fef93825c72e88b9248d02b79 /include/linux/nfs_xdr.h
parent779c51795bfb35c2403c924b9de90ca9356bc693 (diff)
nfs: make sillyrename an async operation
A synchronous rename can be interrupted by a SIGKILL. If that happens during a sillyrename operation, it's possible for the rename call to be sent to the server, but the task exits before processing the reply. If this happens, the sillyrenamed file won't get cleaned up during nfs_dentry_iput and the server is left with a dangling .nfs* file hanging around. Fix this problem by turning sillyrename into an asynchronous operation and have the task doing the sillyrename just wait on the reply. If the task is killed before the sillyrename completes, it'll still proceed to completion. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9ad132e13d12..172df83ac54b 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1018,6 +1018,8 @@ struct nfs_rpc_ops {
1018 int (*unlink_done) (struct rpc_task *, struct inode *); 1018 int (*unlink_done) (struct rpc_task *, struct inode *);
1019 int (*rename) (struct inode *, struct qstr *, 1019 int (*rename) (struct inode *, struct qstr *,
1020 struct inode *, struct qstr *); 1020 struct inode *, struct qstr *);
1021 void (*rename_setup) (struct rpc_message *msg, struct inode *dir);
1022 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
1021 int (*link) (struct inode *, struct inode *, struct qstr *); 1023 int (*link) (struct inode *, struct inode *, struct qstr *);
1022 int (*symlink) (struct inode *, struct dentry *, struct page *, 1024 int (*symlink) (struct inode *, struct dentry *, struct page *,
1023 unsigned int, struct iattr *); 1025 unsigned int, struct iattr *);