Re: [PATCH] ext4: fix a bug when we try to open a file with O_TMPFILE flag

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

 



> My purpose is to trigger this bug and fix it.  So I manually define this
> flag for my convenience.
>
>> I saw it has
>> been defined in header file. (fcntl.h) Did I miss anything?
>
> I guess that you might 'include <fcntl.h>' header file, right?  But the
> O_TMPFILE is defined in $LINUX/include/uapi/asm-generic/fcntl.h.  So
> maybe compiler couldn't find this header file.
>
> Regards,
>                                                 - Zheng
--
Got it. Thank you.  BTW, the weird thing is I didn't see any
discussion on ext4 mailing list before Al Viro committed this change.
The first time I heard about this is someone reporting a bug about it.
Document about this FLAG might be necessary.
Also, about this code:

/* a horrid kludge trying to make sure that this will fail on old kernels */
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)

why not doing something like this:

#ifndef O_TMPFILE
/* a horrid kludge trying to make sure that this will fail on old kernels */
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
#endif

Thanks,
Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux