summaryrefslogtreecommitdiffstats
path: root/mm/damon/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/damon/sysfs.c')
-rw-r--r--mm/damon/sysfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index 6ad6364780b8..719a286d378f 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1694,6 +1694,7 @@ static struct kobj_type damon_sysfs_attrs_ktype = {
/* This should match with enum damon_ops_id */
static const char * const damon_sysfs_ops_strs[] = {
"vaddr",
+ "unsupported", /* fvaddr is not supported by sysfs yet */
"paddr",
};
@@ -1843,6 +1844,9 @@ static ssize_t operations_store(struct kobject *kobj,
for (id = 0; id < NR_DAMON_OPS; id++) {
if (sysfs_streq(buf, damon_sysfs_ops_strs[id])) {
+ /* fvaddr is not supported by sysfs yet */
+ if (id == DAMON_OPS_FVADDR)
+ return -EINVAL;
context->ops_id = id;
return count;
}