On Mon, Sep 17, 2007 at 11:27:28AM -0700, Dave Hansen wrote:
> 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;
Ok.
-
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]