]> Git Repo - linux.git/commitdiff
orangefs: use ->f_mapping
authorAl Viro <[email protected]>
Sat, 20 Aug 2022 17:14:38 +0000 (13:14 -0400)
committerAl Viro <[email protected]>
Thu, 1 Sep 2022 21:46:06 +0000 (17:46 -0400)
... 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]>
fs/orangefs/file.c

index 86810e5d79141a65ccfae1be109399052de67ce4..732661aa26804677f82f1c54a18c91057cc315f5 100644 (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
         * 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",
This page took 0.046357 seconds and 4 git commands to generate.