Commit 4094d98e authored by Al Viro's avatar Al Viro

orangefs: use ->f_mapping

... and don't check for impossible conditions - file_inode() is
never NULL in anything seen by ->release() and neither is its
->i_mapping.
Reviewed-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 265a04b0
...@@ -417,9 +417,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file) ...@@ -417,9 +417,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
* readahead cache (if any); this forces an expensive refresh of * readahead cache (if any); this forces an expensive refresh of
* data for the next caller of mmap (or 'get_block' accesses) * data for the next caller of mmap (or 'get_block' accesses)
*/ */
if (file_inode(file) && if (mapping_nrpages(file->f_mapping)) {
file_inode(file)->i_mapping &&
mapping_nrpages(&file_inode(file)->i_data)) {
if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) { if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) {
gossip_debug(GOSSIP_INODE_DEBUG, gossip_debug(GOSSIP_INODE_DEBUG,
"calling flush_racache on %pU\n", "calling flush_racache on %pU\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment