[CIFS] Fix typo in earlier cifs_unlink change and protect one
extra path. Since cifs_unlink can also be called from rename path and there was one report of oops am making the extra check for null inode. Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
e9917a000f
commit
06bcfedd05
@ -565,14 +565,14 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
|
|||||||
struct cifsInodeInfo *cifsInode;
|
struct cifsInodeInfo *cifsInode;
|
||||||
FILE_BASIC_INFO *pinfo_buf;
|
FILE_BASIC_INFO *pinfo_buf;
|
||||||
|
|
||||||
cFYI(1, ("cifs_unlink, inode = 0x%p with ", inode));
|
cFYI(1, ("cifs_unlink, inode = 0x%p", inode));
|
||||||
|
|
||||||
xid = GetXid();
|
xid = GetXid();
|
||||||
|
|
||||||
if(inode)
|
if(inode)
|
||||||
cifs_sb = CIFS_SB(inode->i_sb);
|
cifs_sb = CIFS_SB(inode->i_sb);
|
||||||
else
|
else
|
||||||
cifs_sb = CIFS_SB(dentry->d_sb);
|
cifs_sb = CIFS_SB(direntry->d_sb);
|
||||||
pTcon = cifs_sb->tcon;
|
pTcon = cifs_sb->tcon;
|
||||||
|
|
||||||
/* Unlink can be called from rename so we can not grab the sem here
|
/* Unlink can be called from rename so we can not grab the sem here
|
||||||
@ -695,9 +695,11 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
|
|||||||
when needed */
|
when needed */
|
||||||
direntry->d_inode->i_ctime = current_fs_time(inode->i_sb);
|
direntry->d_inode->i_ctime = current_fs_time(inode->i_sb);
|
||||||
}
|
}
|
||||||
inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
|
if(inode) {
|
||||||
cifsInode = CIFS_I(inode);
|
inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
|
||||||
cifsInode->time = 0; /* force revalidate of dir as well */
|
cifsInode = CIFS_I(inode);
|
||||||
|
cifsInode->time = 0; /* force revalidate of dir as well */
|
||||||
|
}
|
||||||
|
|
||||||
kfree(full_path);
|
kfree(full_path);
|
||||||
FreeXid(xid);
|
FreeXid(xid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user