diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-07-08 14:14:41 +1000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:44:38 -0400 |
commit | 12ad3ab66103e6582ca69c0c9de18b13487eaaef (patch) | |
tree | 52d1ecd11d48faa7e6f8d6600c8e76807b0985a5 /fs/internal.h | |
parent | 09cc9fc7a7c3d872065426d7fb0f0ad6d3eb90fc (diff) | |
download | blackbird-op-linux-12ad3ab66103e6582ca69c0c9de18b13487eaaef.tar.gz blackbird-op-linux-12ad3ab66103e6582ca69c0c9de18b13487eaaef.zip |
superblock: move pin_sb_for_writeback() to fs/super.c
The per-sb shrinker has the same requirement as the writeback
threads of ensuring that the superblock is usable and pinned for the
time it takes to run the work. Both need to take a passive reference
to the sb, take a read lock on the s_umount lock and then only
continue if an unmount is not in progress.
pin_sb_for_writeback() does this exactly, so move it to fs/super.c
and rename it to grab_super_passive() and exporting it via
fs/internal.h for all the VFS code to be able to use.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/internal.h')
-rw-r--r-- | fs/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h index ae47c48bedde..fe327c20af83 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -97,6 +97,7 @@ extern struct file *get_empty_filp(void); * super.c */ extern int do_remount_sb(struct super_block *, int, void *, int); +extern bool grab_super_passive(struct super_block *sb); extern void __put_super(struct super_block *sb); extern void put_super(struct super_block *sb); extern struct dentry *mount_fs(struct file_system_type *, |