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

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>

Al Viro 8fa1f1c2 efb170c2

+13 -10
+5 -4
fs/fs_pin.c
··· 1 1 #include <linux/fs.h> 2 2 #include <linux/slab.h> 3 3 #include <linux/fs_pin.h> 4 + #include "internal.h" 4 5 #include "mount.h" 5 6 6 7 static void pin_free_rcu(struct rcu_head *head) ··· 33 32 spin_unlock(&pin_lock); 34 33 } 35 34 36 - void acct_auto_close_mnt(struct hlist_head *list) 35 + void mnt_pin_kill(struct mount *m) 37 36 { 38 37 while (1) { 39 38 struct hlist_node *p; 40 39 struct fs_pin *pin; 41 40 rcu_read_lock(); 42 - p = ACCESS_ONCE(list->first); 41 + p = ACCESS_ONCE(m->mnt_pins.first); 43 42 if (!p) { 44 43 rcu_read_unlock(); 45 44 break; ··· 55 54 } 56 55 } 57 56 58 - void acct_auto_close(struct hlist_head *list) 57 + void sb_pin_kill(struct super_block *sb) 59 58 { 60 59 while (1) { 61 60 struct hlist_node *p; 62 61 struct fs_pin *pin; 63 62 rcu_read_lock(); 64 - p = ACCESS_ONCE(list->first); 63 + p = ACCESS_ONCE(sb->s_pins.first); 65 64 if (!p) { 66 65 rcu_read_unlock(); 67 66 break;
+6
fs/internal.h
··· 143 143 * pipe.c 144 144 */ 145 145 extern const struct file_operations pipefifo_fops; 146 + 147 + /* 148 + * fs_pin.c 149 + */ 150 + extern void sb_pin_kill(struct super_block *sb); 151 + extern void mnt_pin_kill(struct mount *m);
+1 -2
fs/namespace.c
··· 16 16 #include <linux/namei.h> 17 17 #include <linux/security.h> 18 18 #include <linux/idr.h> 19 - #include <linux/acct.h> /* acct_auto_close_mnt */ 20 19 #include <linux/init.h> /* init_rootfs */ 21 20 #include <linux/fs_struct.h> /* get_fs_root et.al. */ 22 21 #include <linux/fsnotify.h> /* fsnotify_vfsmount_delete */ ··· 955 956 mnt->mnt_pinned = 0; 956 957 rcu_read_unlock(); 957 958 unlock_mount_hash(); 958 - acct_auto_close_mnt(&mnt->mnt_pins); 959 + mnt_pin_kill(mnt); 959 960 goto put_again; 960 961 } 961 962 if (unlikely(mnt->mnt.mnt_flags & MNT_DOOMED)) {
+1 -2
fs/super.c
··· 22 22 23 23 #include <linux/export.h> 24 24 #include <linux/slab.h> 25 - #include <linux/acct.h> 26 25 #include <linux/blkdev.h> 27 26 #include <linux/mount.h> 28 27 #include <linux/security.h> ··· 706 707 if (remount_ro) { 707 708 if (sb->s_pins.first) { 708 709 up_write(&sb->s_umount); 709 - acct_auto_close(&sb->s_pins); 710 + sb_pin_kill(sb); 710 711 down_write(&sb->s_umount); 711 712 if (!sb->s_root) 712 713 return 0;
-2
include/linux/acct.h
··· 32 32 #define acct_process() do { } while (0) 33 33 #define acct_exit_ns(ns) do { } while (0) 34 34 #endif 35 - extern void acct_auto_close(struct hlist_head *); 36 - extern void acct_auto_close_mnt(struct hlist_head *); 37 35 38 36 /* 39 37 * ACCT_VERSION numbers as yet defined: