linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikhilesh Reddy <reddyn@codeaurora.org>
To: Jann Horn <jann@thejh.net>
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: Wed, 20 Jan 2016 16:15:52 -0800	[thread overview]
Message-ID: <56A02338.9000001@codeaurora.org> (raw)
In-Reply-To: <20160120233841.GA16235@pc.thejh.net>

On Wed 20 Jan 2016 03:38:41 PM PST, Jann Horn wrote:
> 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.

Whoops my bad .. forgot to commit! :(
Thanks for the catch
fixed ... sending patch v4 in a few minutes
-- 
Thanks
Nikhilesh Reddy

Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

      reply	other threads:[~2016-01-21  0:15 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
2016-01-21  0:15   ` Nikhilesh Reddy [this message]

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=56A02338.9000001@codeaurora.org \
    --to=reddyn@codeaurora.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=jann@thejh.net \
    --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=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).