summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-10-14 10:11:16 +0200
committerAdrian Bunk <bunk@stusta.de>2006-10-14 10:11:16 +0200
commita59ce20e0e4ed46c633d284cad159af84a8f2822 (patch)
tree7b3bbc06af6d8a39e00e79b2ca2eae87d4b8542c /fs
parente0326df174d475bdd3da6d0a8730af3a7a347e61 (diff)
[CIFS] Fix unlink oops when indirectly called in rename error path under heavy stress.
Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 59359911f481..cfac39aa1a8c 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -569,7 +569,10 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
xid = GetXid();
- cifs_sb = CIFS_SB(inode->i_sb);
+ if(inode)
+ cifs_sb = CIFS_SB(inode->i_sb);
+ else
+ cifs_sb = CIFS_SB(dentry->d_sb);
pTcon = cifs_sb->tcon;
/* Unlink can be called from rename so we can not grab the sem here