Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
5614293
kbuild: create .prelink.mod files for modpost
bsbernd Nov 7, 2025
150947d
fuse: remove reliance on bdi congestion
PacheNico Apr 16, 2024
dddde6e
fuse: remove unneeded lock which protecting update of congestion_thre…
PacheNico Apr 16, 2024
30e5a69
fuse: Initialize beyond-EOF page contents before setting uptodate
PlaidCat Dec 11, 2024
460d6fa
fuse: update ki_pos in fuse_perform_write
Jun 1, 2023
00950fd
fuse: drop redundant arguments to fuse_perform_write
Jun 1, 2023
ed05787
fuse: Convert to using invalidate_lock
jankara Apr 21, 2021
06ad2f7
fuse: fix use after free in fuse_read_interrupt()
Aug 4, 2021
d9eb093
fuse: flush extending writes
Aug 31, 2021
0f48fbc
fuse: remove unused arg in fuse_write_file_get()
Sep 1, 2021
97b1a09
fuse: make sure reclaim doesn't write the inode
Oct 22, 2021
06f6410
fuse: write inode in fuse_vma_close() instead of fuse_release()
Oct 22, 2021
2040539
fuse: annotate lock in fuse_reverse_inval_entry()
Oct 22, 2021
e458922
fuse: use kmap_local_page()
flying-122 Sep 8, 2021
a61d730
fuse: delete redundant code
flying-122 Sep 6, 2021
5074a3d
fuse: move fuse_invalidate_attr() into fuse_update_ctime()
Oct 22, 2021
b9b6ab0
fuse: simplify __fuse_write_file_get()
Oct 22, 2021
2fc0ccf
fuse: decrement nlink on overwriting rename
Oct 22, 2021
dc95694
fuse: don't increment nlink in link()
Oct 22, 2021
87b0136
fuse: selective attribute invalidation
Oct 22, 2021
5de8b5e
fuse: don't bump attr_version in cached write
Oct 22, 2021
d069161
fuse: rename fuse_write_update_size()
Oct 22, 2021
3df70f4
fuse: always invalidate attributes after writes
Oct 22, 2021
31f2f13
fuse: fix attr version comparison in fuse_read_update_size()
Oct 22, 2021
0c20f82
fuse: cleanup code conditional on fc->writeback_cache
Oct 22, 2021
1005dee
fuse: simplify local variables holding writeback cache state
Oct 22, 2021
d75037d
fuse: move reverting attributes to fuse_change_attributes()
Oct 22, 2021
b474dbf
fuse: add cache_mask
Oct 22, 2021
f6da76e
fuse: take cache_mask into account in getattr
Oct 22, 2021
079262a
fuse: only update necessary attributes
Oct 22, 2021
679e568
fuse: fix page stealing
Nov 2, 2021
c18f81f
fuse: release pipe buf after last use
Nov 25, 2021
aef5362
fuse: Pass correct lend value to filemap_write_and_wait_range()
YongjiXie Nov 22, 2021
1152602
fuse: add fuse_should_enable_dax() helper
lostjeffle Nov 25, 2021
629d569
fuse: make DAX mount option a tri-state
lostjeffle Nov 25, 2021
73f6824
fuse: support per inode DAX in fuse protocol
lostjeffle Nov 25, 2021
fe10fb6
fuse: enable per inode DAX
lostjeffle Nov 25, 2021
8ba7c54
fuse: negotiate per inode DAX in FUSE_INIT
lostjeffle Nov 25, 2021
809c8cf
fuse: mark inode DONT_CACHE when per inode DAX hint changes
lostjeffle Nov 25, 2021
6c5dcdf
fuse: write inode in fuse_release()
Apr 20, 2022
7d3272f
fuse: avoid unnecessary spinlock bump
lostjeffle Apr 2, 2022
246d540
fuse: Remove the control interface for virtio-fs
YongjiXie Jul 18, 2022
9cc1f85
fuse: Add module param for CAP_SYS_ADMIN access bypassing allow_other
davemarchevsky Jul 11, 2022
370fb40
fuse: implement ->tmpfile()
Sep 24, 2022
9e27e2e
fs/fuse: Replace kmap() with kmap_local_page()
xp4ns3 Oct 12, 2022
c2a20a9
fuse: always revalidate rename target dentry
zhangjaycee Sep 28, 2022
36ed6aa
fuse: Remove user_ns check for FUSE_DEV_IOC_CLONE
thejh Sep 14, 2022
cae3db1
fuse: port to vfs{g,u}id_t and associated helpers
brauner Sep 9, 2022
4cbfa35
fuse: remove the unneeded result variable
Sep 1, 2022
b081e39
fuse: Rearrange fuse_allow_current_process checks
davemarchevsky Oct 25, 2022
eaa0894
fuse: in fuse_flush only wait if someone wants the return code
ebiederm Jan 26, 2023
788a6c6
fuse: fix all W=1 kernel-doc warnings
rddunlap Jan 9, 2023
3e147bf
fuse: add inode/permission checks to fileattr_get/fileattr_set
mihalicyn Jan 26, 2023
9c451f3
fuse_dev_ioctl(): switch to fdget()
Aug 21, 2022
6ea1dcf
fuse: remove duplicate check for nodeid
zyfjeff Dec 13, 2022
f5f9b70
fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT
bsbernd Apr 15, 2022
3564b86
fuse: revalidate: don't invalidate if interrupted
Jun 7, 2023
89cccdc
Revert "fuse: in fuse_flush only wait if someone wants the return code"
Aug 14, 2023
5d43fdd
fuse: nlookup missing decrement in fuse_direntplus_link
Apr 25, 2023
62af8a6
fuse: invalidate page cache pages before direct write
Aug 1, 2023
d4a6bec
fuse: add a new fuse init flag to relax restrictions in no cache mode
Aug 1, 2023
521edf2
fuse: write back dirty pages before direct write in direct_io_relax mode
Aug 1, 2023
55a1867
fuse: handle empty request_mask in statx
Aug 10, 2023
80c7fa9
fuse: add STATX request
Aug 10, 2023
16a000e
fuse: add ATTR_TIMEOUT macro
Aug 10, 2023
220b575
fuse: implement statx
Aug 10, 2023
47acabb
fuse: cache btime
Aug 10, 2023
e697c06
fuse: invalidate dentry on EEXIST creates or ENOENT deletes
zhangjaycee Jul 11, 2023
11e7798
fuse: conditionally fill kstat in fuse_do_statx()
bsbernd Aug 23, 2023
10c1361
fuse: move fuse_xattr_handlers to .rodata
wedsonaf Sep 30, 2023
b7da99e
fuse: Rename DIRECT_IO_RELAX to DIRECT_IO_ALLOW_MMAP
tylerfanelli Sep 20, 2023
6c0b1a5
fuse: share lookup state between submount and its parent
kmjohansen Nov 3, 2023
65ed694
fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
HBh25Y Nov 16, 2023
e78c1dc
fuse: disable FOPEN_PARALLEL_DIRECT_WRITES with FUSE_DIRECT_IO_ALLOW_…
amir73il Dec 3, 2023
37206fc
fuse: fix UAF in rcu pathwalks
Sep 28, 2023
3f4b9cc
fuse: fix VM_MAYSHARE and direct_io_allow_mmap
bsbernd Dec 12, 2023
a3d6ee4
fuse: replace remaining make_bad_inode() with fuse_make_bad()
Feb 28, 2024
0ed0654
fuse: fix root lookup with nonzero generation
Feb 28, 2024
7d6dea8
fuse: don't unhash root
Feb 28, 2024
9131aa5
fuse: fix leaked ENOSYS error on first statx call
kdrag0n Apr 14, 2024
f6ed7ee
fuse: verify {g,u}id mount options correctly
Jul 2, 2024
541cb79
fuse: update stats for pages in dropped aux writeback list
joannekoong Aug 26, 2024
29c1c73
fuse: use unsigned type for getxattr/listxattr size truncation
thejh Aug 19, 2024
2be22a9
fuse: fix memory leak in fuse_create_open
yangyun50 Aug 23, 2024
5ae9180
fuse: clear PG_uptodate when using a stolen page
Aug 28, 2024
d0bde2b
virtiofs: use pages instead of pointer for kernel direct IO
Mar 10, 2025
df70a52
fuse: rename to fuse_dev_end_requests and make non-static
bsbernd Jan 20, 2025
9516cda
fuse: Move fuse_get_dev to header file
bsbernd Jan 20, 2025
ac61182
fuse: Move request bits
bsbernd Jan 20, 2025
3c6364b
fuse: make args->in_args[0] to be always the header
bsbernd Jan 20, 2025
906dec4
fuse: {io-uring} Handle SQEs - register commands
bsbernd Jan 20, 2025
cedc5c8
fuse: Make fuse_copy non static
bsbernd Jan 20, 2025
59953a7
fuse: Add fuse-io-uring handling into fuse_copy
bsbernd Jan 20, 2025
7f3c9b9
fuse: {io-uring} Make hash-list req unique finding functions non-static
bsbernd Jan 20, 2025
5444cff
fuse: Add io-uring sqe commit and fetch support
bsbernd Jan 20, 2025
b950b46
fuse: {io-uring} Handle teardown of ring entries
bsbernd Jan 20, 2025
d92ae76
fuse: cleanup request queuing towards virtiofs
May 29, 2024
cc89bf3
fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static
bsbernd Jan 20, 2025
ef14221
fuse: Allow to queue fg requests through io-uring
bsbernd Jan 20, 2025
e5738db
RED-ONLY: fuse: {io-uring red} define IO_URING_F_TASK_DEAD
bsbernd Apr 17, 2025
27031d4
fuse: Allow to queue bg requests through io-uring
bsbernd Jan 20, 2025
c4ca686
fuse: {io-uring} Prevent mount point hang on fuse-server termination
bsbernd Jan 20, 2025
14ba960
fuse: {io-uring} exit task work
bsbernd Nov 8, 2025
1140045
fuse: block request allocation until io-uring init is complete
bsbernd Jan 20, 2025
aa82401
fuse: enable fuse-over-io-uring
bsbernd Jan 20, 2025
5fa9937
fuse: prevent disabling io-uring on active connections
bsbernd Jan 23, 2025
91c033e
fuse: fix uring race condition for null dereference of fc
joannekoong Mar 18, 2025
c3b1563
fuse: fix possible deadlock if rings are never initialized
luis-henrix Mar 6, 2025
8ba1bea
fuse: {io-uring} Fix a possible req cancellation race
bsbernd Mar 25, 2025
dbd51c5
fuse: removed unused function fuse_uring_create() from header
luis-henrix Feb 7, 2025
f63c2fe
fuse: Allocate only namelen buf memory in fuse_notify_
bsbernd Dec 16, 2024
fcad7f1
fuse: use FUSE_ROOT_ID in fuse_get_root_inode()
Feb 28, 2024
b1d2e49
fuse: check attributes staleness on fuse_iget()
cntianci Nov 18, 2024
704c777
fuse: fuse: Use readdir buffer of max_pages size
szmi Apr 8, 2025
3dc9300
Revert "virtiofs: use pages instead of pointer for kernel direct IO"
bsbernd Apr 17, 2025
a78a166
fuse: enable dynamic configuration of fuse max pages limit (FUSE_MAX_…
joannekoong Sep 23, 2024
54f5ef4
fuse: Make the fuse_send_one request counter atomic
bsbernd Apr 2, 2025
e9fc9d2
[RFC] fuse: Set request unique on allocation
bsbernd Apr 2, 2025
59504f7
fuse: add simple request tracepoints
josefbacik Jul 3, 2024
5d980fd
fuse: {io-uring} Avoid _send code dup
bsbernd Apr 2, 2025
13fa892
fuse: fine-grained request ftraces
bsbernd Apr 2, 2025
4c09f82
fuse: Increase FUSE_NAME_MAX to PATH_MAX
bsbernd Dec 16, 2024
808809a
fuse: add support for explicit export disabling
lostjeffle Feb 26, 2024
591998e
fuse: create helper function if DIO write needs exclusive lock
bsbernd Aug 22, 2023
e444452
fuse: factor out helper fuse_truncate_update_attr()
amir73il Feb 1, 2024
6404722
fuse: allocate ff->release_args only if release is needed
amir73il Feb 1, 2024
8b0b622
fuse: break up fuse_open_common()
amir73il Feb 2, 2024
3602d04
fuse: prepare for failing open response
amir73il Feb 1, 2024
9000b3d
fuse: introduce inode io modes
amir73il Feb 1, 2024
2fd474e
fuse: add fuse_dio_lock/unlock helper functions
bsbernd Dec 23, 2023
bd10cab
fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP
amir73il Feb 9, 2024
f83b1cd
fuse: add fast path for fuse_range_is_writeback
yangyun50 Aug 14, 2024
ca0aa9f
fuse: use exclusive lock when FUSE_I_CACHE_IO_MODE is set
yangyun50 Sep 14, 2024
25d0b0f
fuse: Increase the default max pages limit to 8182
bsbernd Apr 8, 2025
72d220d
fuse: {uring} Pin the user buffer
bsbernd Jan 8, 2025
7b667cb
fuse: {io-uring] Avoid complete-in-task if pinned pages are used
bsbernd Jan 17, 2025
609c849
fuse: Add memory barrier in fuse_uring_destruct
bsbernd Apr 22, 2025
a5f4720
fuse: Use fuser-server provided read-ahead for CAP_SYS_ADMIN
bsbernd May 7, 2025
24cb2de
fuse: fix race between concurrent setattrs from multiple nodes
gwu-ddn May 2, 2025
2d6cfc0
fuse: add DLM_LOCK opcode
bsbernd Jun 20, 2025
246acd2
fuse: invalidate inode aliases when doing inode invalidation
yongzech Jul 8, 2025
84d8ba6
fuse: Renumber FUSE_DLM_WB_LOCK to 100
cding-ddn Jul 17, 2025
6300f58
fuse: Send DLM_WB_LOCK request in page_mkwrite handler
cding-ddn Jul 16, 2025
296dd10
fuse: Allow read_folio to retry page fault and read operations
cding-ddn Jul 16, 2025
36e496e
fuse: flush pending fuse events before aborting the connection
Jul 17, 2025
672f588
fuse: Refactor io-uring bg queue flush and queue abort
bsbernd Jul 18, 2025
d5de605
fuse: Flush the io-uring bg queue from fuse_uring_flush_bg
bsbernd Jul 18, 2025
9c0d41e
fuse: fix unnecessary connection abort in dlm lock acquiring
hbirth Jul 21, 2025
4e6fc61
fuse: fix connection abort on mmap when fuse server returns ENOSYS
hbirth Jul 21, 2025
9f1af20
fuse: fix memory leak in fuse-over-io-uring argument copies
cding-ddn Sep 24, 2025
f239b75
fuse: change FUSE DLM_LOCK to request start and end of area
hbirth Aug 20, 2025
6db9027
Create workflow the create pr for redfs in each branch
openunix Sep 29, 2025
0c92477
fuse: Invalidate the page cache after FOPEN_DIRECT_IO write
bsbernd Oct 22, 2025
d9d8ac3
fuse: Always flush the page cache before FOPEN_DIRECT_IO write
bsbernd Oct 22, 2025
d3348e4
fuse: {io-uring} Add queue length counters
bsbernd Jun 2, 2025
2e39f56
fuse: {io-uring} Rename ring->nr_queues to max_nr_queues
bsbernd Jun 13, 2025
0f59155
fuse: {io-uring} Use bitmaps to track registered queues
bsbernd Jun 10, 2025
611432a
fuse: {io-uring} Allow reduced number of ring queues
bsbernd Jun 4, 2025
38c0ef7
fuse: {io-uring} Queue background requests on a different core
bsbernd Sep 24, 2025
1f1b69d
fuse: Add retry attempts for numa local queues for load distribution
bsbernd Oct 24, 2025
2407a55
fuse: Fetch a queued fuse request on command registration
bsbernd Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/create-redfs-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Automatially run copy-from-linux-branch.sh on branches and create PR for redfs.
name: Sync to redfs repo
on:
# Triggers the workflow on pull request merged.
pull_request:
branches: [ "*" ]
types: [ "closed" ]

jobs:
create-redfs-pr:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
# Checks-out to a different directory to avoid following checkout removing it.
- uses: actions/checkout@v4
with:
path: linux

- name: Try to checkout sync-${{ github.ref_name }} if it exists
uses: actions/checkout@v4
id: try-checkout
continue-on-error: true
with:
repository: DDNStorage/redfs
ref: sync-${{ github.ref_name }}
fetch-depth: 0
path: redfs
token: ${{ secrets.REDFS_TOKEN }}

- name: Fallback to checkout main
if: steps.try-checkout.outcome == 'failure'
uses: actions/checkout@v4
with:
repository: DDNStorage/redfs
ref: main
fetch-depth: 0
path: redfs
token: ${{ secrets.REDFS_TOKEN }}

- name: Initialize git
run: |
git config --global user.name "DDNStorage RED Workflow"
git config --global user.email "red@ddn.com"

- name: Create tracking branch based on main
if: steps.try-checkout.outcome == 'failure'
run: |
pushd redfs
git checkout -b sync-${{ github.ref_name }}
popd

- name: Generate PR for redfs
run: |
declare -A MAP
MAP["redfs-rhel9_5-503.40.1"]="5.14.0-503.40.1.el9_5"
MAP["redfs-rhel9_6-570.12.1"]="5.14.0-570.26.1.el9_6"
MAP["redfs-ubuntu-noble-6.8.0-58.60"]="6.8.0-58.60.ubuntu"
kerver=${MAP["${{ github.ref_name }}"]}
if [ -z ${kerver} ]; then
echo "Cannot find target kernel version"
exit 1
fi
pushd redfs
./copy-from-linux-branch.sh $GITHUB_WORKSPACE/linux ${kerver}
git add src/$kerver
echo -e "Sync with ${{ github.repository }} branch ${{ github.ref_name }} \n" > ../commit.msg
echo -e "Sync with ${{ github.repository }} branch ${{ github.ref_name }} by commit" >> ../commit.msg
echo -e "${{ github.sha }}" >> ../commit.msg
RET=0
git commit -F ../commit.msg 2> ../commit.log || RET=$?;
if [ -s ../commit.log ]; then
echo "Error detcted in commit:"
cat ../commit.log
exit 1
elif [ $RET -eq 0 ]; then
echo "Done. Push the code to remote:"
git push origin sync-${{ github.ref_name }} 2> ../push.log ||:
else
echo "No changes to existed codes. Still try with PR."
fi
if [ -s ../push.log ]; then
echo "Error detected in push:"
cat ../push.log
fi
gh pr create --base main --fill || RET=$?
if [ $RET -eq 1 ]; then
echo "No pending changes for PR, returning $RET."
fi
popd
env:
GH_TOKEN: ${{ secrets.OPENUNIXPAT }}

10 changes: 10 additions & 0 deletions Documentation/admin-guide/sysctl/fs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,13 @@ Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes
on a 64bit one.
The current default value for max_user_watches is the 1/25 (4%) of the
available low memory, divided for the "watch" cost in bytes.

5. /proc/sys/fs/fuse - Configuration options for FUSE filesystems
=====================================================================

This directory contains the following configuration options for FUSE
filesystems:

``/proc/sys/fs/fuse/max_pages_limit`` is a read/write file for
setting/getting the maximum number of pages that can be used for servicing
requests in FUSE.
29 changes: 24 additions & 5 deletions Documentation/filesystems/fuse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ How are requirements fulfilled?
the filesystem or not.

Note that the *ptrace* check is not strictly necessary to
prevent B/2/i, it is enough to check if mount owner has enough
prevent C/2/i, it is enough to check if mount owner has enough
privilege to send signal to the process accessing the
filesystem, since *SIGSTOP* can be used to get a similar effect.

Expand All @@ -288,10 +288,29 @@ I think these limitations are unacceptable?

If a sysadmin trusts the users enough, or can ensure through other
measures, that system processes will never enter non-privileged
mounts, it can relax the last limitation with a 'user_allow_other'
config option. If this config option is set, the mounting user can
add the 'allow_other' mount option which disables the check for other
users' processes.
mounts, it can relax the last limitation in several ways:

- With the 'user_allow_other' config option. If this config option is
set, the mounting user can add the 'allow_other' mount option which
disables the check for other users' processes.

User namespaces have an unintuitive interaction with 'allow_other':
an unprivileged user - normally restricted from mounting with
'allow_other' - could do so in a user namespace where they're
privileged. If any process could access such an 'allow_other' mount
this would give the mounting user the ability to manipulate
processes in user namespaces where they're unprivileged. For this
reason 'allow_other' restricts access to users in the same userns
or a descendant.

- With the 'allow_sys_admin_access' module option. If this option is
set, super user's processes have unrestricted access to mounts
irrespective of allow_other setting or user namespace of the
mounting user.

Note that both of these relaxations expose the system to potential
information leak or *DoS* as described in points B and C/2/i-ii in the
preceding section.

Kernel - userspace interface
============================
Expand Down
12 changes: 12 additions & 0 deletions fs/fuse/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ config FUSE_DAX

If you want to allow mounting a Virtio Filesystem with the "dax"
option, answer Y.

config FUSE_IO_URING
bool "FUSE communication over io-uring"
default y
depends on FUSE_FS
depends on IO_URING
help
This allows sending FUSE requests over the io-uring interface and
also adds request core affinity.

If you want to allow fuse server/client communication through io-uring,
answer Y
8 changes: 7 additions & 1 deletion fs/fuse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
# Makefile for the FUSE filesystem.
#

# Needed for trace events
ccflags-y = -I$(src)

obj-$(CONFIG_FUSE_FS) += fuse.o
obj-$(CONFIG_CUSE) += cuse.o
obj-$(CONFIG_VIRTIO_FS) += virtiofs.o

fuse-y := dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o
fuse-y := dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o fuse_dlm_cache.o
fuse-y += iomode.o
fuse-$(CONFIG_FUSE_DAX) += dax.o
fuse-$(CONFIG_FUSE_IO_URING) += dev_uring.o
fuse-$(CONFIG_SYSCTL) += sysctl.o

virtiofs-y := virtio_fs.o
2 changes: 1 addition & 1 deletion fs/fuse/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int fuse_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
return ret;
}

if (!in_group_p(i_gid_into_mnt(&init_user_ns, inode)) &&
if (!vfsgid_in_group_p(i_gid_into_vfsgid(&init_user_ns, inode)) &&
!capable_wrt_inode_uidgid(&init_user_ns, inode, CAP_FSETID))
extra_flags |= FUSE_SETXATTR_ACL_KILL_SGID;

Expand Down
27 changes: 3 additions & 24 deletions fs/fuse/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
{
unsigned val;
struct fuse_conn *fc;
struct fuse_mount *fm;
ssize_t ret;

ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
Expand All @@ -175,27 +174,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
if (!fc)
goto out;

down_read(&fc->killsb);
spin_lock(&fc->bg_lock);
fc->congestion_threshold = val;

/*
* Get any fuse_mount belonging to this fuse_conn; s_bdi is
* shared between all of them
*/

if (!list_empty(&fc->mounts)) {
fm = list_first_entry(&fc->mounts, struct fuse_mount, fc_entry);
if (fc->num_background < fc->congestion_threshold) {
clear_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC);
clear_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC);
} else {
set_bdi_congested(fm->sb->s_bdi, BLK_RW_SYNC);
set_bdi_congested(fm->sb->s_bdi, BLK_RW_ASYNC);
}
}
spin_unlock(&fc->bg_lock);
up_read(&fc->killsb);
WRITE_ONCE(fc->congestion_threshold, val);
fuse_conn_put(fc);
out:
return ret;
Expand Down Expand Up @@ -275,7 +254,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc)
struct dentry *parent;
char name[32];

if (!fuse_control_sb)
if (!fuse_control_sb || fc->no_control)
return 0;

parent = fuse_control_sb->s_root;
Expand Down Expand Up @@ -313,7 +292,7 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc)
{
int i;

if (!fuse_control_sb)
if (!fuse_control_sb || fc->no_control)
return;

for (i = fc->ctl_ndents - 1; i >= 0; i--) {
Expand Down
10 changes: 3 additions & 7 deletions fs/fuse/cuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int cuse_parse_one(char **pp, char *end, char **keyp, char **valp)
}

/**
* cuse_parse_dev_info - parse device info
* cuse_parse_devinfo - parse device info
* @p: device info string
* @len: length of device info string
* @devinfo: out parameter for parsed device info
Expand Down Expand Up @@ -474,8 +474,7 @@ static int cuse_send_init(struct cuse_conn *cc)

static void cuse_fc_release(struct fuse_conn *fc)
{
struct cuse_conn *cc = fc_to_cc(fc);
kfree_rcu(cc, fc.rcu);
kfree(fc_to_cc(fc));
}

/**
Expand Down Expand Up @@ -545,7 +544,6 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
{
struct fuse_dev *fud = file->private_data;
struct cuse_conn *cc = fc_to_cc(fud->fc);
int rc;

/* remove from the conntbl, no more access from this point on */
mutex_lock(&cuse_lock);
Expand All @@ -560,9 +558,7 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
cdev_del(cc->cdev);
}

rc = fuse_dev_release(inode, file); /* puts the base reference */

return rc;
return fuse_dev_release(inode, file);
}

static struct file_operations cuse_channel_fops; /* initialized during init */
Expand Down
Loading
Loading