> mnt_want_write_file() checks for write permission to the mount, not to the
> file.
>
> I think this ioctl wants what f2fs_sec_trim_file() does:
>
> if (!(filp->f_mode & FMODE_WRITE))
> return -EBADF;
>
> file_start_write(filp);
> inode_lock(inode);
>
On Wed, Oct 14, 2020 at 11:27:30AM +0900, Daeho Jeong wrote:
> > f2fs_readonly() is redundant with mnt_want_write_file().
> >
> > Also, shouldn't this require a writable file descriptor? As-is, this ioctl
> > can
> > be called on a file owned by another user, as long as the caller has read
> > ac
> f2fs_readonly() is redundant with mnt_want_write_file().
>
> Also, shouldn't this require a writable file descriptor? As-is, this ioctl
> can
> be called on a file owned by another user, as long as the caller has read
> access.
>
> Note: if you change this to require a writable file descriptor,
On Tue, Oct 13, 2020 at 11:24:29AM +0900, Daeho Jeong wrote:
> +static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)
> +{
> + struct inode *inode = file_inode(filp);
> + struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
> + struct f2fs_comp_option option;
> + int
4 matches
Mail list logo