The patch titled r-o-bind-mounts: make access() use mnt check has been removed from the -mm tree. Its filename was r-o-bind-mounts-make-access-use-mnt-check.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: r-o-bind-mounts: make access() use mnt check From: Dave Hansen <haveblue@xxxxxxxxxx> It is OK to let access() go without using a mnt_want/drop_write() pair because it doesn't actually do writes to the filesystem, and it is inherently racy anyway. This is a rare case when it is OK to use __mnt_is_readonly() directly. Acked-by: Christoph Hellwig <hch@xxxxxxxxxxxxx> Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/open.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -puN fs/open.c~r-o-bind-mounts-make-access-use-mnt-check fs/open.c --- a/fs/open.c~r-o-bind-mounts-make-access-use-mnt-check +++ a/fs/open.c @@ -459,8 +459,17 @@ asmlinkage long sys_faccessat(int dfd, c if(res || !(mode & S_IWOTH) || special_file(nd.dentry->d_inode->i_mode)) goto out_path_release; - - if(IS_RDONLY(nd.dentry->d_inode)) + /* + * This is a rare case where using __mnt_is_readonly() + * is OK without a mnt_want/drop_write() pair. Since + * no actual write to the fs is performed here, we do + * not need to telegraph to that to anyone. + * + * By doing this, we accept that this access is + * inherently racy and know that the fs may change + * state before we even see this result. + */ + if (__mnt_is_readonly(nd.mnt)) res = -EROFS; out_path_release: _ Patches currently in -mm which might be from haveblue@xxxxxxxxxx are enable-hotplug-memory-remove-for-ppc64.patch r-o-bind-mounts-make-access-use-mnt-check.patch r-o-bind-mounts-nfs-check-mnt-instead-of-superblock-directly.patch r-o-bind-mounts-sys_mknodat-elevate-write-count-for-vfs_mknod-create.patch r-o-bind-mounts-track-number-of-mount-writers.patch r-o-bind-mounts-honor-r-w-changes-at-do_remount-time.patch keep-track-of-mnt_writer-state-of-struct-file.patch create-file_drop_write_access-helper.patch fix-up-new-filp-allocators.patch reiser4.patch page-owner-tracking-leak-detector.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html