mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Catch filesystems lacking s_bdi
noop_backing_dev_info is used only as a flag to mark filesystems that don't have any backing store, like tmpfs, procfs, spufs, etc. Signed-off-by: Joern Engel <[email protected]> Changed the BUG_ON() to a WARN_ON(). Note that adding dirty inodes to the noop_backing_dev_info is not legal and will not result in them being flushed, but we already catch this condition in __mark_inode_dirty() when checking for a registered bdi. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
7e2455c1a1
commit
5129a469a9
4 changed files with 13 additions and 4 deletions
|
|
@ -693,6 +693,7 @@ int set_anon_super(struct super_block *s, void *data)
|
|||
return -EMFILE;
|
||||
}
|
||||
s->s_dev = MKDEV(0, dev & MINORMASK);
|
||||
s->s_bdi = &noop_backing_dev_info;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -954,10 +955,11 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
|
|||
if (error < 0)
|
||||
goto out_free_secdata;
|
||||
BUG_ON(!mnt->mnt_sb);
|
||||
WARN_ON(!mnt->mnt_sb->s_bdi);
|
||||
|
||||
error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
|
||||
if (error)
|
||||
goto out_sb;
|
||||
error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
|
||||
if (error)
|
||||
goto out_sb;
|
||||
|
||||
/*
|
||||
* filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE
|
||||
|
|
|
|||
Loading…
Reference in a new issue