diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-20 13:14:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-09-01 17:46:06 -0400 |
commit | 4094d98e3375833737b467998219338ffd46a68b (patch) | |
tree | 7024f943436b65c2651cb050d05278fada736853 /fs/orangefs | |
parent | 265a04b076077b3f5a169231e290ad106d3aa2ca (diff) | |
download | lwn-4094d98e3375833737b467998219338ffd46a68b.tar.gz lwn-4094d98e3375833737b467998219338ffd46a68b.zip |
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) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index 86810e5d7914..732661aa2680 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -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 * data for the next caller of mmap (or 'get_block' accesses) */ - if (file_inode(file) && - file_inode(file)->i_mapping && - mapping_nrpages(&file_inode(file)->i_data)) { + if (mapping_nrpages(file->f_mapping)) { if (orangefs_features & ORANGEFS_FEATURE_READAHEAD) { gossip_debug(GOSSIP_INODE_DEBUG, "calling flush_racache on %pU\n", |