Commit dd3e2c55 authored by Al Viro's avatar Al Viro

fuse: rcu-delay freeing fuse_conn

makes ->permission() and ->d_revalidate() safety in RCU mode independent
from vfsmount_lock.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 1adfcb03
...@@ -473,7 +473,7 @@ static int cuse_send_init(struct cuse_conn *cc) ...@@ -473,7 +473,7 @@ static int cuse_send_init(struct cuse_conn *cc)
static void cuse_fc_release(struct fuse_conn *fc) static void cuse_fc_release(struct fuse_conn *fc)
{ {
struct cuse_conn *cc = fc_to_cc(fc); struct cuse_conn *cc = fc_to_cc(fc);
kfree(cc); kfree_rcu(cc, fc.rcu);
} }
/** /**
......
...@@ -377,6 +377,8 @@ struct fuse_conn { ...@@ -377,6 +377,8 @@ struct fuse_conn {
/** Refcount */ /** Refcount */
atomic_t count; atomic_t count;
struct rcu_head rcu;
/** The user id for this mount */ /** The user id for this mount */
kuid_t user_id; kuid_t user_id;
......
...@@ -918,7 +918,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) ...@@ -918,7 +918,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
static void fuse_free_conn(struct fuse_conn *fc) static void fuse_free_conn(struct fuse_conn *fc)
{ {
kfree(fc); kfree_rcu(fc, rcu);
} }
static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb) static int fuse_bdi_init(struct fuse_conn *fc, struct super_block *sb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment