[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160120233841.GA16235@pc.thejh.net>
Date: Thu, 21 Jan 2016 00:38:41 +0100
From: Jann Horn <jann@...jh.net>
To: Nikhilesh Reddy <reddyn@...eaurora.org>
Cc: torvalds@...ux-foundation.org, Miklos Szeredi <miklos@...redi.hu>,
fuse-devel <fuse-devel@...ts.sourceforge.net>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
gregkh@...uxfoundation.org, linux-fsdevel@...r.kernel.org,
viro@...iv.linux.org.uk,
Richard Weinberger <richard.weinberger@...il.com>,
Theodore Ts'o <tytso@....edu>, jack@...e.cz,
Antonio SJ Musumeci <trapexit@...wn.link>, sven.utcke@....de,
Nikolaus Rath <nikolaus@...h.org>,
Jann Horn <jannhorn@...glemail.com>
Subject: Re: [PATCH v3] fuse: Add support for passthrough read/write
On Wed, Jan 20, 2016 at 03:20:34PM -0800, Nikhilesh Reddy wrote:
> Add support for filesystem passthrough read/write of files
> when enabled in userspace through the option FUSE_PASSTHROUGH.
[...]
> + daemon_fd = (int)open_out->passthrough_fd;
> + if (daemon_fd < 0)
> + return;
> +
> + passthrough_filp = fget_raw(daemon_fd);
> + if (!passthrough_filp)
> + return;
> +
> + passthrough_inode = file_inode(passthrough_filp);
> + passthrough_sb = passthrough_inode->i_sb;
> + fs_stack_depth = passthrough_sb->s_stack_depth + 1;
> +
> + /* If we reached the stacking limit go through regular io */
> + if (fs_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
> + pr_err("FUSE: maximum fs stacking depth exceeded, cannot use passthrough for this file\n");
> + return;
> + }
I think this needs an fput() in the error case to prevent a refcount leak.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists