aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-03-31 22:43:50 +0000
committerSteve French <sfrench@us.ibm.com>2006-03-31 22:43:50 +0000
commit06bcfedd05448e63cae8924074bfacdf82bb17d4 (patch)
treec213b29cad1f44db615f5293476abd249618b70d /fs/cifs/inode.c
parente9917a000fcc370408c8b7b83f2e85dba5fffbd4 (diff)
[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>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index ca91ea38d61..957ddd1571c 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -565,14 +565,14 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
struct cifsInodeInfo *cifsInode;
FILE_BASIC_INFO *pinfo_buf;
- cFYI(1, ("cifs_unlink, inode = 0x%p with ", inode));
+ cFYI(1, ("cifs_unlink, inode = 0x%p", inode));
xid = GetXid();
if(inode)
cifs_sb = CIFS_SB(inode->i_sb);
else
- cifs_sb = CIFS_SB(dentry->d_sb);
+ cifs_sb = CIFS_SB(direntry->d_sb);
pTcon = cifs_sb->tcon;
/* 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 */
direntry->d_inode->i_ctime = current_fs_time(inode->i_sb);
}
- inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
- cifsInode = CIFS_I(inode);
- cifsInode->time = 0; /* force revalidate of dir as well */
+ if(inode) {
+ inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
+ cifsInode = CIFS_I(inode);
+ cifsInode->time = 0; /* force revalidate of dir as well */
+ }
kfree(full_path);
FreeXid(xid);