changes to the VFS API:
- fs/namei.c:permission() is changed to take a dentry argument
instead of an inode.
and
- ditto for the permission callback in the inode_operations
Since from a dentry wee can always get an inode but not the converse
I think this is a good change (the additional cost of a few cycles in
a couple of places is negligible).
[...]
- if (rep || dentry->d_count > 1 || permission(inode, MAY_WRITE) || get_write_access(inode)) goto ret;
+ if (rep || dentry->d_count > 1 || vfs_permission(inode, MAY_WRITE) || get_write_access(inode)) goto ret;
Off on a tangent -- I wish people would bracket things to emphasize
the order of operations, something like:
if(rep || (dentry->d_count>1) || vfs_permission(inode,MAY_WRITE) || get_write_access(inode)) goto ret;
it more readable IMO.
--cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:23 EST