aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2010-04-25 02:54:42 -0400
committerJens Axboe <jens.axboe@oracle.com>2010-04-25 02:54:42 -0400
commit5129a469a91a91427334c40e29e64c6d0ab68caf (patch)
tree141a17cbea94c7c9c038187cc7081e1c688eac55 /fs/super.c
parent7e2455c1a123ceadbb35150a610d61e8443fd340 (diff)
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 <joern@logfs.org> 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 <jens.axboe@oracle.com>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/super.c b/fs/super.c
index f35ac6022109..dc72491a19f9 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -693,6 +693,7 @@ int set_anon_super(struct super_block *s, void *data)
693 return -EMFILE; 693 return -EMFILE;
694 } 694 }
695 s->s_dev = MKDEV(0, dev & MINORMASK); 695 s->s_dev = MKDEV(0, dev & MINORMASK);
696 s->s_bdi = &noop_backing_dev_info;
696 return 0; 697 return 0;
697} 698}
698 699
@@ -954,10 +955,11 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
954 if (error < 0) 955 if (error < 0)
955 goto out_free_secdata; 956 goto out_free_secdata;
956 BUG_ON(!mnt->mnt_sb); 957 BUG_ON(!mnt->mnt_sb);
958 WARN_ON(!mnt->mnt_sb->s_bdi);
957 959
958 error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata); 960 error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata);
959 if (error) 961 if (error)
960 goto out_sb; 962 goto out_sb;
961 963
962 /* 964 /*
963 * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE 965 * filesystems should never set s_maxbytes larger than MAX_LFS_FILESIZE