]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: make sillyrename an async operation
authorJeff Layton <jlayton@redhat.com>
Fri, 17 Sep 2010 21:31:57 +0000 (17:31 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 17 Sep 2010 21:31:57 +0000 (17:31 -0400)
commit1e64d05a768dd5c7daa53435866be1911f1a7584
tree552ea5586bb64f8fef93825c72e88b9248d02b79
parent8565347d9dce77f3ad9748dce34ea25507832f3c
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>
fs/nfs/nfs3proc.c
fs/nfs/nfs4proc.c
fs/nfs/proc.c
fs/nfs/unlink.c
include/linux/nfs_xdr.h