]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[CIFS] Fix unlink oops when indirectly called in rename error path under heavy stress.
authorSteve French <sfrench@us.ibm.com>
Sat, 14 Oct 2006 08:11:16 +0000 (10:11 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sat, 14 Oct 2006 08:11:16 +0000 (10:11 +0200)
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
fs/cifs/inode.c

index 59359911f4810c601923261c94cd49ffeebf5542..cfac39aa1a8c3c38d56dea0912fef716b80b2e5c 100644 (file)
@@ -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