Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fuse: rcu-delay freeing fuse_conn

makes ->permission() and ->d_revalidate() safety in RCU mode independent
from vfsmount_lock.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro dd3e2c55 1adfcb03

+4 -2
+1 -1
fs/fuse/cuse.c
··· 473 473 static void cuse_fc_release(struct fuse_conn *fc) 474 474 { 475 475 struct cuse_conn *cc = fc_to_cc(fc); 476 - kfree(cc); 476 + kfree_rcu(cc, fc.rcu); 477 477 } 478 478 479 479 /**
+2
fs/fuse/fuse_i.h
··· 377 377 /** Refcount */ 378 378 atomic_t count; 379 379 380 + struct rcu_head rcu; 381 + 380 382 /** The user id for this mount */ 381 383 kuid_t user_id; 382 384
+1 -1
fs/fuse/inode.c
··· 918 918 919 919 static void fuse_free_conn(struct fuse_conn *fc) 920 920 { 921 - kfree(fc); 921 + kfree_rcu(fc, rcu); 922 922 } 923 923 924 924 static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb)