This patch should make no functional changes. Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx> --- lxc-dave/fs/open.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff -puN fs/open.c~elevate-writers-opens-part2-sys_faccessat fs/open.c --- lxc/fs/open.c~elevate-writers-opens-part2-sys_faccessat 2006-06-07 16:53:23.000000000 -0700 +++ lxc-dave/fs/open.c 2006-06-07 16:53:23.000000000 -0700 @@ -537,15 +537,17 @@ asmlinkage long sys_faccessat(int dfd, c current->cap_effective = current->cap_permitted; res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); - if (!res) { - res = vfs_permission(&nd, mode); - /* SuS v2 requires we report a read only fs too */ - if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) - && !special_file(nd.dentry->d_inode->i_mode)) - res = -EROFS; - path_release(&nd); - } + if (res) + goto out; + res = vfs_permission(&nd, mode); + /* SuS v2 requires we report a read only fs too */ + if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) + && !special_file(nd.dentry->d_inode->i_mode)) + res = -EROFS; + path_release(&nd); + +out: current->fsuid = old_fsuid; current->fsgid = old_fsgid; current->cap_effective = old_cap; _ - 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