Skip to content

Commit

Permalink
[CIFS] Fix unlink oops when indirectly called in rename error path
Browse files Browse the repository at this point in the history
under heavy stress.

Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Steve French committed Mar 31, 2006
1 parent d62e54a commit 6910ab3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6910ab3

Please sign in to comment.