From: Jann Horn <jann@thejh.net>
To: Nikhilesh Reddy <reddyn@codeaurora.org>
Cc: torvalds@linux-foundation.org, Miklos Szeredi <miklos@szeredi.hu>,
fuse-devel <fuse-devel@lists.sourceforge.net>,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk,
Richard Weinberger <richard.weinberger@gmail.com>,
Theodore Ts'o <tytso@mit.edu>,
jack@suse.cz, Antonio SJ Musumeci <trapexit@spawn.link>,
sven.utcke@gmx.de, Nikolaus Rath <nikolaus@rath.org>,
Jann Horn <jannhorn@googlemail.com>
Subject: Re: [PATCH v3] fuse: Add support for passthrough read/write
Date: Thu, 21 Jan 2016 00:38:41 +0100 [thread overview]
Message-ID: <20160120233841.GA16235@pc.thejh.net> (raw)
In-Reply-To: <56A01642.7030806@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-20 23:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 23:20 [PATCH v3] fuse: Add support for passthrough read/write Nikhilesh Reddy
2016-01-20 23:38 ` Jann Horn [this message]
[not found] ` <20160120233841.GA16235-J1fxOzX/cBvk1uMJSBkQmQ@public.gmane.org>
2016-01-21 0:15 ` Nikhilesh Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160120233841.GA16235@pc.thejh.net \
--to=jann@thejh.net \
--cc=fuse-devel@lists.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=jannhorn@googlemail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=nikolaus@rath.org \
--cc=reddyn@codeaurora.org \
--cc=richard.weinberger@gmail.com \
--cc=sven.utcke@gmx.de \
--cc=torvalds@linux-foundation.org \
--cc=trapexit@spawn.link \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).