From: Steve French Date: Sat, 14 Oct 2006 08:11:16 +0000 (+0200) Subject: [CIFS] Fix unlink oops when indirectly called in rename error path under heavy stress. X-Git-Tag: v2.6.16.30-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a59ce20e0e4ed46c633d284cad159af84a8f2822;p=people%2Fms%2Flinux.git [CIFS] Fix unlink oops when indirectly called in rename error path under heavy stress. Signed-off-by: Steve French Signed-off-by: Adrian Bunk --- 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