exfat_iterate(): don't open-code file_inode(file)
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 4 Aug 2022 01:27:11 +0000 (21:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 1 Sep 2022 21:42:52 +0000 (17:42 -0400)
and it's file, not filp...

Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exfat/dir.c

index a27b55ec060a08e2c83e3299d9d3496747047972..0fc08fdcba7337d0c4040bce47c4730445036d41 100644 (file)
@@ -212,9 +212,9 @@ static void exfat_free_namebuf(struct exfat_dentry_namebuf *nb)
 
 /* skip iterating emit_dots when dir is empty */
 #define ITER_POS_FILLED_DOTS    (2)
-static int exfat_iterate(struct file *filp, struct dir_context *ctx)
+static int exfat_iterate(struct file *file, struct dir_context *ctx)
 {
-       struct inode *inode = filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
        struct super_block *sb = inode->i_sb;
        struct inode *tmp;
        struct exfat_dir_entry de;
@@ -228,7 +228,7 @@ static int exfat_iterate(struct file *filp, struct dir_context *ctx)
        mutex_lock(&EXFAT_SB(sb)->s_lock);
 
        cpos = ctx->pos;
-       if (!dir_emit_dots(filp, ctx))
+       if (!dir_emit_dots(file, ctx))
                goto unlock;
 
        if (ctx->pos == ITER_POS_FILLED_DOTS) {