Re: [PATCH] s390: Hypervisor File System

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

 



Michael Holzheu <[email protected]> wrote:
>
> > > +   if (filp->f_mode & FMODE_WRITE) {
>  > > +      if (!(inode->i_mode & S_IWUGO))
>  > > +         return -EACCES;
>  > > +   }
>  > > +   if (filp->f_mode & FMODE_READ) {
>  > > +      if (!(inode->i_mode & S_IRUGO))
>  > > +         return -EACCES;
>  > > +   }
>  >
>  > Is the standard VFS permission checking not appropriate?
>  >
>  > (A comment should be added here).
> 
>  You mean using .permission in the inode operations
>  and using the generic_permission() function?
> 
>  Currently I do not have own inode operations (and
>  I don't want to have them ...)

The VFS-level open() code implements standard permission-checking so I
_think_ you don't need to do anything in here.  See how ramfs does it.

ramfs does have an inode_operations, for ->getattr() support.  So it can
return a correct number in stat->blocks.

sysfs implements inode_operations, so it can do stuff in ->setattr().

I don't think hypfs needs either of those, so you still shouldn't need a
file_inode_operations.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux