From 99109822f5cbe6d530eb55193b25aa5348f6134d Mon Sep 17 00:00:00 2001 From: Martin Brandenburg Date: Thu, 28 Jan 2016 10:19:40 -0500 Subject: orangefs: Fix revalidate. Previously, it would update a live inode. This was fixed, but it did not ever check that the inode attributes in the dcache are correct. This checks all inode attributes and rejects any that are not correct, which causes a lookup and thus a new getattr. Perhaps inode_operations->permission should replace or augment some of this. There is no actual caching, and this does a rather excessive amount of network operations back to the filesystem server. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall --- fs/orangefs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/orangefs/file.c') diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index c585063d1100..7e6fe8d8ab2b 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -467,7 +467,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite /* Make sure generic_write_checks sees an up to date inode size. */ if (file->f_flags & O_APPEND) { rc = orangefs_inode_getattr(file->f_mapping->host, - ORANGEFS_ATTR_SYS_SIZE); + ORANGEFS_ATTR_SYS_SIZE, 0); if (rc) { gossip_err("%s: orangefs_inode_getattr failed, rc:%zd:.\n", __func__, rc); @@ -681,7 +681,7 @@ static loff_t orangefs_file_llseek(struct file *file, loff_t offset, int origin) * NOTE: We are only interested in file size here, * so we set mask accordingly. */ - ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_SIZE); + ret = orangefs_inode_getattr(inode, ORANGEFS_ATTR_SYS_SIZE, 0); if (ret) { gossip_debug(GOSSIP_FILE_DEBUG, "%s:%s:%d calling make bad inode\n", -- cgit