diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-30 12:24:25 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-03 15:26:29 -0400 |
commit | ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4 (patch) | |
tree | 3b32adfdc8fb978f1933d43591e36ed0b14897d6 /include/linux/nfs_fs.h | |
parent | a5250def7c4549a6a1cd8257900bef9c12ffc2fc (diff) | |
download | linux-ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4.tar.gz linux-ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4.tar.bz2 linux-ba6c05928dcafc7e0a0c8e4ee6a293ba47190fd4.zip |
NFS: Ensure that rmdir() waits for sillyrenames to complete
If an NFS client does
mkdir("dir");
fd = open("dir/file");
unlink("dir/file");
close(fd);
rmdir("dir");
then the asynchronous nature of the sillyrename operation means that
we can end up getting EBUSY for the rmdir() in the above test. Fix
that by ensuring that we wait for any in-progress sillyrenames
before sending the rmdir() to the server.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 7125cef74164..3ea4cde8701c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -524,6 +524,7 @@ static inline void nfs4_label_free(void *label) {} * linux/fs/nfs/unlink.c */ extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); +extern void nfs_wait_on_sillyrename(struct dentry *dentry); extern void nfs_block_sillyrename(struct dentry *dentry); extern void nfs_unblock_sillyrename(struct dentry *dentry); extern int nfs_sillyrename(struct inode *dir, struct dentry *dentry); |