Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313702

Re: [PATCH v3] fuse: Add support for passthrough read/write

From Jann Horn <jann@thejh.net>
Newsgroups linux.kernel
Subject Re: [PATCH v3] fuse: Add support for passthrough read/write
Date 2016-01-21 00:40 +0100
Message-ID <qTaw1-58k-9@gated-at.bofh.it> (permalink)
References <qTamn-53Q-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] fuse: Add support for passthrough read/write Nikhilesh Reddy <reddyn@codeaurora.org> - 2016-01-21 00:30 +0100
  Re: [PATCH v3] fuse: Add support for passthrough read/write Jann Horn <jann@thejh.net> - 2016-01-21 00:40 +0100
    Re: [PATCH v3] fuse: Add support for passthrough read/write Nikhilesh Reddy <reddyn@codeaurora.org> - 2016-01-21 01:20 +0100

csiph-web