summaryrefslogtreecommitdiff
path: root/fs/nfs/unlink.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-26 17:37:47 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:21 -0500
commitfccca7fc6aab4e6b519e2d606ef34632e4f50e33 (patch)
tree4d12d88039d229263a610647df6c751585f714dc /fs/nfs/unlink.c
parent5b10ca19ea4859d3884d10a3eb8495de92089792 (diff)
downloadlinux-3.10-fccca7fc6aab4e6b519e2d606ef34632e4f50e33.tar.gz
linux-3.10-fccca7fc6aab4e6b519e2d606ef34632e4f50e33.tar.bz2
linux-3.10-fccca7fc6aab4e6b519e2d606ef34632e4f50e33.zip
NFS: Fix a sillyrename race...
Ensure that readdir revalidates its data cache after blocking on sillyrename. Also fix a typo in nfs_do_call_unlink(): swap the ^= for an |=. The result is the same, since we've already checked that the flag is unset, but it makes the code more readable. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r--fs/nfs/unlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 233ad38161f..c5fa6d8001f 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -138,7 +138,7 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n
spin_lock(&alias->d_lock);
if (!(alias->d_flags & DCACHE_NFSFS_RENAMED)) {
alias->d_fsdata = data;
- alias->d_flags ^= DCACHE_NFSFS_RENAMED;
+ alias->d_flags |= DCACHE_NFSFS_RENAMED;
ret = 1;
}
spin_unlock(&alias->d_lock);