mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 23:47:04 +07:00
efb170c228
Add a new field to fs_pin - kill(pin). That's what umount and r/o remount will be calling for all pins attached to vfsmount and superblock resp. Called after bumping the refcount, so it won't go away under us. Dropping the refcount is responsibility of the instance. All generic stuff moved to fs/fs_pin.c; the next step will rip all the knowledge of kernel/acct.c from fs/super.c and fs/namespace.c. After that - death to mnt_pin(); it was intended to be usable as generic mechanism for code that wants to attach objects to vfsmount, so that they would not make the sucker busy and would get killed on umount. Never got it right; it remained acct.c-specific all along. Now it's very close to being killable. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
18 lines
326 B
C
18 lines
326 B
C
#include <linux/fs.h>
|
|
|
|
struct fs_pin {
|
|
atomic_long_t count;
|
|
union {
|
|
struct {
|
|
struct hlist_node s_list;
|
|
struct hlist_node m_list;
|
|
};
|
|
struct rcu_head rcu;
|
|
};
|
|
void (*kill)(struct fs_pin *);
|
|
};
|
|
|
|
void pin_put(struct fs_pin *);
|
|
void pin_remove(struct fs_pin *);
|
|
void pin_insert(struct fs_pin *, struct vfsmount *);
|