]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Ensure that rmdir() waits for sillyrenames to complete
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 30 Aug 2013 16:24:25 +0000 (12:24 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Sep 2013 19:26:29 +0000 (15:26 -0400)
commit7f87c33bf146a871ee37a8c8f6a18e1d59ba387d
tree3b32adfdc8fb978f1933d43591e36ed0b14897d6
parent0145efe4035dbba24cd3a5be10b24581709ed2eb
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>
fs/nfs/dir.c
fs/nfs/unlink.c
include/linux/nfs_fs.h