Skip to contentSkip to conversation

f2fs: fix to show correct discard_granularity in sysfs

PATCH New Chao Yu 1 participant 1 message Sep 12, 2017 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: fix to show correct discard_granularity in sysfs

Fix below incorrect display when reading discard_granularity sysfs node.

$ cat /sys/fs/f2fs/<device>/discard_granularity
$ 16
$ echo 32 > /sys/fs/f2fs/<device>/discard_granularity
$ cat /sys/fs/f2fs/<device>/discard_granularity
$ 16
---
 fs/f2fs/sysfs.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/sysfs.c +2 -0
index 962735dc9c63..e2c258f717cd 100644
@@ -170,6 +170,8 @@ static ssize_t f2fs_sbi_store(struct f2fs_attr *a,
 				dcc->pend_list_tag[i] &= (~P_ACTIVE);
 		}
 		mutex_unlock(&dcc->cmd_lock);
+
+		*ui = t;
 		return count;
 	}
 
Signature · 6 lines
2.13.1.388.g69e6b9b4f4a9


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot