]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs/namei.c: fix coding style in atomic_open() and lookup_open()
authorChristian Brauner <brauner@kernel.org>
Fri, 31 Jul 2026 08:36:07 +0000 (10:36 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Jul 2026 08:37:40 +0000 (10:37 +0200)
Commit 4886c80eef20 ("vfs: call audit_inode_child() in lookup_open() on
failure") indented a continuation line with spaces, left three
declarations without a following blank line and used a trailing */ on the
last line of a block comment.  Clean all of that up, no functional change.

Link: https://patch.msgid.link/20260731-work-lookup-fixes-v1-3-2412b85cf65c@kernel.org
Fixes: 4886c80eef20 ("vfs: call audit_inode_child() in lookup_open() on failure")
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/namei.c

index e31905dfeb204326f55053ae50f0978d0a122206..c0da9b5dd47ad9bd4c4ec08a5cb094bae032a5ce 100644 (file)
@@ -4377,6 +4377,7 @@ static struct dentry *atomic_open(const struct path *path, struct dentry *dentry
                if (file->f_mode & FMODE_OPENED) {
                        /* finish_open() called */
                        struct dentry *opened = file->f_path.dentry;
+
                        if (unlikely(opened != dentry)) {
                                dput(dentry);
                                dentry = dget(opened);
@@ -4384,6 +4385,7 @@ static struct dentry *atomic_open(const struct path *path, struct dentry *dentry
                } else if (likely(file->f_path.dentry != DENTRY_NOT_SET)) {
                        /* finish_no_open() called */
                        struct dentry *replaced = file->f_path.dentry;
+
                        if (replaced) {
                                dput(dentry);
                                dentry = replaced;
@@ -4392,8 +4394,9 @@ static struct dentry *atomic_open(const struct path *path, struct dentry *dentry
                                error = -ENOENT;
                } else {
                        const char *fsname = dentry->d_sb->s_type->name;
+
                        WARN(1, "%s: ->atomic_open() left file->f_path.dentry unset!\n",
-                               fsname);
+                            fsname);
                        error = -EIO;
                }
        }
@@ -4540,8 +4543,10 @@ retry:
                }
        }
        if (dentry->d_inode || !(op->open_flag & O_CREAT)) {
-               /* No need to create a file. If lookup returned a positive
-                * dentry, the file will be opened in do_open(). */
+               /*
+                * No need to create a file.  If lookup returned a positive
+                * dentry, the file will be opened in do_open().
+                */
                goto out;
        }