NFS: Separate metadata and page cache revalidation mechanisms
Separate out the function of revalidating the inode metadata, and revalidating the mapping. The former may be called by lookup(), and only really needs to check that permissions, ctime, etc haven't changed whereas the latter needs only done when we want to read data from the page cache, and may need to sync and then invalidate the mapping. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@ -528,7 +528,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
|
||||
|
||||
lock_kernel();
|
||||
|
||||
res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
|
||||
res = nfs_revalidate_mapping(inode, filp->f_mapping);
|
||||
if (res < 0) {
|
||||
unlock_kernel();
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user