Re: [git pull] new mount API

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

 



On Fri, Aug 24, 2018 at 4:26 PM, David Howells <dhowells@xxxxxxxxxx> wrote:
> Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
>> +/* Mount flags passed to fsmount(2) */
>> +#define M_NOSUID     0x01
>> +#define M_NODEV              0x02
>> +#define M_NOEXEC     0x04
>> +#define M_NOATIME    0x08
>> +#define M_NODIRATIME 0x10
>> +#define M_STRICTATIME        0x20
>> +#define M_RDONLY     0x40
>
> If we're going to do this, I would suggest a longer prefix than just 'M'

Any suggestions?

We could do "MOUNT_", but that sounds tad too long.  But hey, that
doesn't matter much either.   Let me know your preference.

>  and
> renumber them to put *_RDONLY first.
>
>> +     BUILD_BUG_ON(M_NOSUID != MNT_NOSUID || M_NODEV != MNT_NODEV ||
>> +                  M_NOEXEC != MNT_NOEXEC || M_NOATIME != MNT_NOATIME ||
>> +                  M_NODIRATIME != MNT_NODIRATIME ||
>> +                  M_STRICTATIME != MNT_RELATIME || M_RDONLY != MNT_READONLY);
>
> Please don't, please do:
>
>         if (ms_flags & M_RDONLY)
>                 mnt_flags |= MNT_READONLY;

As I said, I don't really care either way.

Thanks,
Miklos



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux