aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
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 ca91ea38d611..957ddd1571c6 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -565,14 +565,14 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
565 struct cifsInodeInfo *cifsInode; 565 struct cifsInodeInfo *cifsInode;
566 FILE_BASIC_INFO *pinfo_buf; 566 FILE_BASIC_INFO *pinfo_buf;
567 567
568 cFYI(1, ("cifs_unlink, inode = 0x%p with ", inode)); 568 cFYI(1, ("cifs_unlink, inode = 0x%p", inode));
569 569
570 xid = GetXid(); 570 xid = GetXid();
571 571
572 if(inode) 572 if(inode)
573 cifs_sb = CIFS_SB(inode->i_sb); 573 cifs_sb = CIFS_SB(inode->i_sb);
574 else 574 else
575 cifs_sb = CIFS_SB(dentry->d_sb); 575 cifs_sb = CIFS_SB(direntry->d_sb);
576 pTcon = cifs_sb->tcon; 576 pTcon = cifs_sb->tcon;
577 577
578 /* Unlink can be called from rename so we can not grab the sem here 578 /* 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)
695 when needed */ 695 when needed */
696 direntry->d_inode->i_ctime = current_fs_time(inode->i_sb); 696 direntry->d_inode->i_ctime = current_fs_time(inode->i_sb);
697 } 697 }
698 inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); 698 if(inode) {
699 cifsInode = CIFS_I(inode); 699 inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
700 cifsInode->time = 0; /* force revalidate of dir as well */ 700 cifsInode = CIFS_I(inode);
701 cifsInode->time = 0; /* force revalidate of dir as well */
702 }
701 703
702 kfree(full_path); 704 kfree(full_path);
703 FreeXid(xid); 705 FreeXid(xid);