Skip to content

Commit 4094d98

Browse files
author
Al Viro
committed
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: Christian Brauner (Microsoft) <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 265a04b commit 4094d98

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/orangefs/file.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,7 @@ static int orangefs_file_release(struct inode *inode, struct file *file)
417417
* readahead cache (if any); this forces an expensive refresh of
418418
* data for the next caller of mmap (or 'get_block' accesses)
419419
*/
420-
if (file_inode(file) &&
421-
file_inode(file)->i_mapping &&
422-
mapping_nrpages(&file_inode(file)->i_data)) {
420+
if (mapping_nrpages(file->f_mapping)) {
423421
if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) {
424422
gossip_debug(GOSSIP_INODE_DEBUG,
425423
"calling flush_racache on %pU\n",

0 commit comments

Comments
 (0)