Re: [PATCH v2 33/63] don't bother passing new_path->dentry to can_move_mount_beneath()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Aug 2025 at 16:08, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
>         if (beneath) {
> -               err = can_move_mount_beneath(old, new_path, mp.mp);
> +               err = can_move_mount_beneath(old, real_mount(new_path->mnt), mp.mp);
>                 if (err)
>                         return err;
>         }

Going through the patches, this is one that I think made things
uglier... Most of them make me go "nice simplification".

(I'll have a separate comment on 61/63)

I certainly agree with the intent of the patch, but that
can_move_mount_beneath() call line is now rather hard to read. It
looked simpler before.

Maybe you could just split it into two lines, and write it as

        if (beneath) {
                struct mount *new_mnt = real_mount(new_path->mnt);
                err = can_move_mount_beneath(old, new_mnt, mp.mp);
                if (err)
                        return err;
        }

which makes slightly less happen in that one line (and it fits in 80
columns too - not a requirement, but still "good taste")

Long lines are better than randomly splitting lines unreadably into
multiple lines, but short lines that are logically split are still
preferred, I would say..

            Linus




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux