summaryrefslogtreecommitdiff
path: root/fs/sync.c
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2010-04-25 08:54:42 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-04-25 08:54:42 +0200
commit5129a469a91a91427334c40e29e64c6d0ab68caf (patch)
tree141a17cbea94c7c9c038187cc7081e1c688eac55 /fs/sync.c
parent7e2455c1a123ceadbb35150a610d61e8443fd340 (diff)
downloadlinux-3.10-5129a469a91a91427334c40e29e64c6d0ab68caf.tar.gz
linux-3.10-5129a469a91a91427334c40e29e64c6d0ab68caf.tar.bz2
linux-3.10-5129a469a91a91427334c40e29e64c6d0ab68caf.zip
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/sync.c')
-rw-r--r--fs/sync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sync.c b/fs/sync.c
index fc5c3d75cf3..92b228176f7 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -14,6 +14,7 @@
#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
+#include <linux/backing-dev.h>
#include "internal.h"
#define VALID_FLAGS (SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| \
@@ -32,7 +33,7 @@ static int __sync_filesystem(struct super_block *sb, int wait)
* This should be safe, as we require bdi backing to actually
* write out data in the first place
*/
- if (!sb->s_bdi)
+ if (!sb->s_bdi || sb->s_bdi == &noop_backing_dev_info)
return 0;
if (sb->s_qcop && sb->s_qcop->quota_sync)