Messages in this thread |  | | | Date | Fri, 28 Apr 2006 12:44:16 -0700 | | From | Andrew Morton <> | | Subject | Re: [PATCH] s390: Hypervisor File System |
| |
Michael Holzheu <HOLZHEU@de.ibm.com> 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |