Re: Fixing fmode_t warnings

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

 



On Tue, Nov 18, 2008 at 10:41:17AM -0600, Steve French wrote:
> Do you think it is worthwhile fixing this "sparse" warning ?  oflags
> is an int since the lookup intent open.flags is an int ...
> 
> CHECK   fs/cifs/dir.c
> fs/cifs/dir.c:169:16: warning: restricted fmode_t degrades to integer
> fs/cifs/dir.c:171:16: warning: restricted fmode_t degrades to integer
> 
>                 int oflags = nd->intent.open.flags;
>                 desiredAccess = 0;
> (line 169) if (oflags & FMODE_READ)
>                         desiredAccess |= GENERIC_READ;
> (line 171) if (oflags & FMODE_WRITE) {

It's worse than that; open.flags *mixes* FMODE_... with O_...
The right solution is to get rid of the damn thing and pass struct file
with pre-fill ->f_mode to (split-off) variant of create.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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