aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.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/sync.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/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 fc5c3d75cf3c..92b228176f7c 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -14,6 +14,7 @@
14#include <linux/pagemap.h> 14#include <linux/pagemap.h>
15#include <linux/quotaops.h> 15#include <linux/quotaops.h>
16#include <linux/buffer_head.h> 16#include <linux/buffer_head.h>
17#include <linux/backing-dev.h>
17#include "internal.h" 18#include "internal.h"
18 19
19#define VALID_FLAGS (SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| \ 20#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)
32 * This should be safe, as we require bdi backing to actually 33 * This should be safe, as we require bdi backing to actually
33 * write out data in the first place 34 * write out data in the first place
34 */ 35 */
35 if (!sb->s_bdi) 36 if (!sb->s_bdi || sb->s_bdi == &noop_backing_dev_info)
36 return 0; 37 return 0;
37 38
38 if (sb->s_qcop && sb->s_qcop->quota_sync) 39 if (sb->s_qcop && sb->s_qcop->quota_sync)