You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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 <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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user