Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190341
b: refs/heads/master
c: 5129a46
h: refs/heads/master
i:
  190339: 067a4a3
v: v3
  • Loading branch information
Jörn Engel authored and Jens Axboe committed Apr 25, 2010
1 parent 48746cf commit bb7ed2a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e2455c1a123ceadbb35150a610d61e8443fd340
refs/heads/master: 5129a469a91a91427334c40e29e64c6d0ab68caf
8 changes: 5 additions & 3 deletions trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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| \
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/backing-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
#endif

extern struct backing_dev_info default_backing_dev_info;
extern struct backing_dev_info noop_backing_dev_info;
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);

int writeback_in_progress(struct backing_dev_info *bdi);
Expand Down
5 changes: 5 additions & 0 deletions trunk/mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ struct backing_dev_info default_backing_dev_info = {
};
EXPORT_SYMBOL_GPL(default_backing_dev_info);

struct backing_dev_info noop_backing_dev_info = {
.name = "noop",
};
EXPORT_SYMBOL_GPL(noop_backing_dev_info);

static struct class *bdi_class;

/*
Expand Down

0 comments on commit bb7ed2a

Please sign in to comment.