aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index a5ed10c9afef..b7431afdd76d 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -329,8 +329,10 @@ cifs_destroy_inode(struct inode *inode)
329} 329}
330 330
331static void 331static void
332cifs_clear_inode(struct inode *inode) 332cifs_evict_inode(struct inode *inode)
333{ 333{
334 truncate_inode_pages(&inode->i_data, 0);
335 end_writeback(inode);
334 cifs_fscache_release_inode_cookie(inode); 336 cifs_fscache_release_inode_cookie(inode);
335} 337}
336 338
@@ -479,14 +481,13 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data)
479 return 0; 481 return 0;
480} 482}
481 483
482void cifs_drop_inode(struct inode *inode) 484static int cifs_drop_inode(struct inode *inode)
483{ 485{
484 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 486 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
485 487
486 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) 488 /* no serverino => unconditional eviction */
487 return generic_drop_inode(inode); 489 return !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) ||
488 490 generic_drop_inode(inode);
489 return generic_delete_inode(inode);
490} 491}
491 492
492static const struct super_operations cifs_super_ops = { 493static const struct super_operations cifs_super_ops = {
@@ -495,7 +496,7 @@ static const struct super_operations cifs_super_ops = {
495 .alloc_inode = cifs_alloc_inode, 496 .alloc_inode = cifs_alloc_inode,
496 .destroy_inode = cifs_destroy_inode, 497 .destroy_inode = cifs_destroy_inode,
497 .drop_inode = cifs_drop_inode, 498 .drop_inode = cifs_drop_inode,
498 .clear_inode = cifs_clear_inode, 499 .evict_inode = cifs_evict_inode,
499/* .delete_inode = cifs_delete_inode, */ /* Do not need above 500/* .delete_inode = cifs_delete_inode, */ /* Do not need above
500 function unless later we add lazy close of inodes or unless the 501 function unless later we add lazy close of inodes or unless the
501 kernel forgets to call us with the same number of releases (closes) 502 kernel forgets to call us with the same number of releases (closes)