47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 9e6755da18a187eb1389a205680049587d97c62a Mon Sep 17 00:00:00 2001
|
|
From: Hongbo Li <lihongbo22@huawei.com>
|
|
Date: Tue, 29 Oct 2024 20:53:50 +0800
|
|
Subject: [PATCH 053/233] bcachefs: remove write permission for gc_gens_pos
|
|
sysfs interface
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The gc_gens_pos is used to show the status of bucket gen gc.
|
|
There is no need to assign write permissions for this attribute.
|
|
Here we can use read_attribute helper to define this attribute.
|
|
|
|
```
|
|
[Before]
|
|
$ ll internal/gc_gens_pos
|
|
-rw-r--r-- 1 root root 4096 Oct 28 15:27 internal/gc_gens_pos
|
|
|
|
[After]
|
|
$ ll internal/gc_gens_pos
|
|
-r--r--r-- 1 root root 4096 Oct 28 17:27 internal/gc_gens_pos
|
|
```
|
|
|
|
Fixes: ac516d0e7db7 ("bcachefs: Add the status of bucket gen gc to sysfs")
|
|
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
|
|
---
|
|
fs/bcachefs/sysfs.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
|
|
index 4ab0ccba2ab5..47ac8d5ab562 100644
|
|
--- a/fs/bcachefs/sysfs.c
|
|
+++ b/fs/bcachefs/sysfs.c
|
|
@@ -146,7 +146,7 @@ write_attribute(trigger_journal_writes);
|
|
write_attribute(trigger_btree_cache_shrink);
|
|
write_attribute(trigger_btree_key_cache_shrink);
|
|
write_attribute(trigger_freelist_wakeup);
|
|
-rw_attribute(gc_gens_pos);
|
|
+read_attribute(gc_gens_pos);
|
|
|
|
read_attribute(uuid);
|
|
read_attribute(minor);
|
|
--
|
|
2.45.2
|
|
|