diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:32 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-03-18 10:57:57 +0100 |
commit | aa1262b3876ec5249ff464618a7dcd46b3ca54e2 (patch) | |
tree | b150bb2c83c073e1f0e298ba7899148f7d991ef7 /mm/backing-dev.c | |
parent | 806b2139db236e0cbd0b5833ab0ce139f0196bcd (diff) | |
parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
download | op-kernel-dev-aa1262b3876ec5249ff464618a7dcd46b3ca54e2.zip op-kernel-dev-aa1262b3876ec5249ff464618a7dcd46b3ca54e2.tar.gz |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to the newly
added ITG-3200 driver.
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index d3ca2b3..41733c5 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -221,12 +221,23 @@ static ssize_t max_ratio_store(struct device *dev, } BDI_SHOW(max_ratio, bdi->max_ratio) +static ssize_t stable_pages_required_show(struct device *dev, + struct device_attribute *attr, + char *page) +{ + struct backing_dev_info *bdi = dev_get_drvdata(dev); + + return snprintf(page, PAGE_SIZE-1, "%d\n", + bdi_cap_stable_pages_required(bdi) ? 1 : 0); +} + #define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store) static struct device_attribute bdi_dev_attrs[] = { __ATTR_RW(read_ahead_kb), __ATTR_RW(min_ratio), __ATTR_RW(max_ratio), + __ATTR_RO(stable_pages_required), __ATTR_NULL, }; |