mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
09cc9fc7a7
commit
12ad3ab661
3 changed files with 35 additions and 27 deletions
|
|
@ -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 *,
|
||||
|
|
|
|||
Loading…
Reference in a new issue