Skip to content

Commit

Permalink
staging/lustre: Fix max_dirty_mb output in sysfs
Browse files Browse the repository at this point in the history
%ul definitely was supposed to be %lu in the format string,
so we print long unsigned int value, not just unsigned int
with a letter l added at the end.

Signed-off-by: Oleg Drokin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
verygreen authored and gregkh committed Sep 1, 2016
1 parent d6e7a2f commit 44fae22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ LUSTRE_STATIC_UINT_ATTR(timeout, &obd_timeout);
static ssize_t max_dirty_mb_show(struct kobject *kobj, struct attribute *attr,
char *buf)
{
return sprintf(buf, "%ul\n",
obd_max_dirty_pages / (1 << (20 - PAGE_SHIFT)));
return sprintf(buf, "%lu\n",
(unsigned long)obd_max_dirty_pages /
(1 << (20 - PAGE_SHIFT)));
}

static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr,
Expand Down

0 comments on commit 44fae22

Please sign in to comment.