summaryrefslogtreecommitdiff
path: root/fs/orangefs/file.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-09-28 14:47:29 -0400
committerMartin Brandenburg <martin@omnibond.com>2016-09-28 14:47:29 -0400
commitf808e138c0abd99bfce90ec8d4ef6406c2af714a (patch)
treebe66f4beb9de1b2fecbf1e59950fe714184c8ecb /fs/orangefs/file.c
parenta21aae3bb15a1d08040bdcf5a73504c0da9f5080 (diff)
parent0c95ad76361f1d75a1ffdf82deafbcec44d19c42 (diff)
Merge branch 'features' into for-next
Pull in an OrangeFS branch containing improvements which the userspace component and the kernel to negotiate mutually supported features.
Diffstat (limited to 'fs/orangefs/file.c')
-rw-r--r--fs/orangefs/file.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 43c08b5c7168..fe5e1eac9561 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -624,11 +624,14 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
if (file->f_path.dentry->d_inode &&
file->f_path.dentry->d_inode->i_mapping &&
mapping_nrpages(&file->f_path.dentry->d_inode->i_data)) {
- gossip_debug(GOSSIP_INODE_DEBUG,
- "calling flush_racache on %pU\n",
- get_khandle_from_ino(inode));
- flush_racache(inode);
- gossip_debug(GOSSIP_INODE_DEBUG, "flush_racache finished\n");
+ if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) {
+ gossip_debug(GOSSIP_INODE_DEBUG,
+ "calling flush_racache on %pU\n",
+ get_khandle_from_ino(inode));
+ flush_racache(inode);
+ gossip_debug(GOSSIP_INODE_DEBUG,
+ "flush_racache finished\n");
+ }
truncate_inode_pages(file->f_path.dentry->d_inode->i_mapping,
0);
}