From: Steve French Date: Fri, 31 Mar 2006 03:37:08 +0000 (+0000) Subject: [CIFS] Fix unlink oops when indirectly called in rename error path X-Git-Tag: v2.6.17-rc1~25^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6910ab30a29d10e0fec7710b2ed857a2201e2468;p=linux-2.6 [CIFS] Fix unlink oops when indirectly called in rename error path under heavy stress. Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index e842ce9f65..ca91ea38d6 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