aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/unlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index c5fa6d8001f1..431981d0265f 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -130,13 +130,15 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n
130 alias = d_lookup(parent, &data->args.name); 130 alias = d_lookup(parent, &data->args.name);
131 if (alias != NULL) { 131 if (alias != NULL) {
132 int ret = 0; 132 int ret = 0;
133
133 /* 134 /*
134 * Hey, we raced with lookup... See if we need to transfer 135 * Hey, we raced with lookup... See if we need to transfer
135 * the sillyrename information to the aliased dentry. 136 * the sillyrename information to the aliased dentry.
136 */ 137 */
137 nfs_free_dname(data); 138 nfs_free_dname(data);
138 spin_lock(&alias->d_lock); 139 spin_lock(&alias->d_lock);
139 if (!(alias->d_flags & DCACHE_NFSFS_RENAMED)) { 140 if (alias->d_inode != NULL &&
141 !(alias->d_flags & DCACHE_NFSFS_RENAMED)) {
140 alias->d_fsdata = data; 142 alias->d_fsdata = data;
141 alias->d_flags |= DCACHE_NFSFS_RENAMED; 143 alias->d_flags |= DCACHE_NFSFS_RENAMED;
142 ret = 1; 144 ret = 1;