make fs/{namespace,super}.c forget about acct.h
These externs belong in fs/internal.h. Rename (they are not acct-specific anymore) and move them over there. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
efb170c228
commit
8fa1f1c2bd
@ -1,6 +1,7 @@
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/fs_pin.h>
|
#include <linux/fs_pin.h>
|
||||||
|
#include "internal.h"
|
||||||
#include "mount.h"
|
#include "mount.h"
|
||||||
|
|
||||||
static void pin_free_rcu(struct rcu_head *head)
|
static void pin_free_rcu(struct rcu_head *head)
|
||||||
@ -32,13 +33,13 @@ void pin_insert(struct fs_pin *pin, struct vfsmount *m)
|
|||||||
spin_unlock(&pin_lock);
|
spin_unlock(&pin_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
void acct_auto_close_mnt(struct hlist_head *list)
|
void mnt_pin_kill(struct mount *m)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
struct hlist_node *p;
|
struct hlist_node *p;
|
||||||
struct fs_pin *pin;
|
struct fs_pin *pin;
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
p = ACCESS_ONCE(list->first);
|
p = ACCESS_ONCE(m->mnt_pins.first);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
break;
|
break;
|
||||||
@ -54,13 +55,13 @@ void acct_auto_close_mnt(struct hlist_head *list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void acct_auto_close(struct hlist_head *list)
|
void sb_pin_kill(struct super_block *sb)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
struct hlist_node *p;
|
struct hlist_node *p;
|
||||||
struct fs_pin *pin;
|
struct fs_pin *pin;
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
p = ACCESS_ONCE(list->first);
|
p = ACCESS_ONCE(sb->s_pins.first);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
break;
|
break;
|
||||||
|
@ -143,3 +143,9 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
|||||||
* pipe.c
|
* pipe.c
|
||||||
*/
|
*/
|
||||||
extern const struct file_operations pipefifo_fops;
|
extern const struct file_operations pipefifo_fops;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* fs_pin.c
|
||||||
|
*/
|
||||||
|
extern void sb_pin_kill(struct super_block *sb);
|
||||||
|
extern void mnt_pin_kill(struct mount *m);
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <linux/namei.h>
|
#include <linux/namei.h>
|
||||||
#include <linux/security.h>
|
#include <linux/security.h>
|
||||||
#include <linux/idr.h>
|
#include <linux/idr.h>
|
||||||
#include <linux/acct.h> /* acct_auto_close_mnt */
|
|
||||||
#include <linux/init.h> /* init_rootfs */
|
#include <linux/init.h> /* init_rootfs */
|
||||||
#include <linux/fs_struct.h> /* get_fs_root et.al. */
|
#include <linux/fs_struct.h> /* get_fs_root et.al. */
|
||||||
#include <linux/fsnotify.h> /* fsnotify_vfsmount_delete */
|
#include <linux/fsnotify.h> /* fsnotify_vfsmount_delete */
|
||||||
@ -956,7 +955,7 @@ put_again:
|
|||||||
mnt->mnt_pinned = 0;
|
mnt->mnt_pinned = 0;
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
unlock_mount_hash();
|
unlock_mount_hash();
|
||||||
acct_auto_close_mnt(&mnt->mnt_pins);
|
mnt_pin_kill(mnt);
|
||||||
goto put_again;
|
goto put_again;
|
||||||
}
|
}
|
||||||
if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) {
|
if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) {
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/acct.h>
|
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
#include <linux/mount.h>
|
#include <linux/mount.h>
|
||||||
#include <linux/security.h>
|
#include <linux/security.h>
|
||||||
@ -707,7 +706,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
|
|||||||
if (remount_ro) {
|
if (remount_ro) {
|
||||||
if (sb->s_pins.first) {
|
if (sb->s_pins.first) {
|
||||||
up_write(&sb->s_umount);
|
up_write(&sb->s_umount);
|
||||||
acct_auto_close(&sb->s_pins);
|
sb_pin_kill(sb);
|
||||||
down_write(&sb->s_umount);
|
down_write(&sb->s_umount);
|
||||||
if (!sb->s_root)
|
if (!sb->s_root)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -32,8 +32,6 @@ extern void acct_exit_ns(struct pid_namespace *);
|
|||||||
#define acct_process() do { } while (0)
|
#define acct_process() do { } while (0)
|
||||||
#define acct_exit_ns(ns) do { } while (0)
|
#define acct_exit_ns(ns) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
extern void acct_auto_close(struct hlist_head *);
|
|
||||||
extern void acct_auto_close_mnt(struct hlist_head *);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACCT_VERSION numbers as yet defined:
|
* ACCT_VERSION numbers as yet defined:
|
||||||
|
Loading…
Reference in New Issue
Block a user