diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 05b525812adb..d34325c887c4 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1039,14 +1039,20 @@ int cifs_revalidate(struct dentry *direntry) | |||
1039 | filemap_fdatawrite(direntry->d_inode->i_mapping); | 1039 | filemap_fdatawrite(direntry->d_inode->i_mapping); |
1040 | } | 1040 | } |
1041 | if (invalidate_inode) { | 1041 | if (invalidate_inode) { |
1042 | if (direntry->d_inode->i_mapping) | 1042 | /* shrink_dcache not necessary now that cifs dentry ops |
1043 | filemap_fdatawait(direntry->d_inode->i_mapping); | 1043 | are exported for negative dentries */ |
1044 | /* may eventually have to do this for open files too */ | 1044 | /* if(S_ISDIR(direntry->d_inode->i_mode)) |
1045 | if (list_empty(&(cifsInode->openFileList))) { | 1045 | shrink_dcache_parent(direntry); */ |
1046 | /* Has changed on server - flush read ahead pages */ | 1046 | if (S_ISREG(direntry->d_inode->i_mode)) { |
1047 | cFYI(1, ("Invalidating read ahead data on " | 1047 | if (direntry->d_inode->i_mapping) |
1048 | "closed file")); | 1048 | filemap_fdatawait(direntry->d_inode->i_mapping); |
1049 | invalidate_remote_inode(direntry->d_inode); | 1049 | /* may eventually have to do this for open files too */ |
1050 | if (list_empty(&(cifsInode->openFileList))) { | ||
1051 | /* changed on server - flush read ahead pages */ | ||
1052 | cFYI(1, ("Invalidating read ahead data on " | ||
1053 | "closed file")); | ||
1054 | invalidate_remote_inode(direntry->d_inode); | ||
1055 | } | ||
1050 | } | 1056 | } |
1051 | } | 1057 | } |
1052 | /* up(&direntry->d_inode->i_sem); */ | 1058 | /* up(&direntry->d_inode->i_sem); */ |