Re: [PATCH v2 4/5] fuse: prepare for failing open response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2 Feb 2024 at 13:03, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

>  static int fuse_dir_open(struct inode *inode, struct file *file)
>  {
> -       return fuse_open_common(inode, file, true);
> +       struct fuse_mount *fm = get_fuse_mount(inode);
> +       struct fuse_inode *fi = get_fuse_inode(inode);
> +       int err;
> +
> +       if (fuse_is_bad(inode))
> +               return -EIO;
> +
> +       err = generic_file_open(inode, file);
> +       if (err)
> +               return err;
> +
> +       err = fuse_do_open(fm, get_node_id(inode), file, true);
> +       if (!err) {
> +               struct fuse_file *ff = file->private_data;
> +
> +               err = fuse_finish_open(inode, file);

I'd prefer fuse_finish_open() to be expanded as well.  FMODE_WRITE is
always false for directories.  The other two FOPEN_ flags don't make
sense for directories, but let's just leave them for a later cleanup.

Thanks,
Miklos




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux