[PATCH 3/9] fs: ramfs: create symlinks with mode 0777
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 20 00:09:28 PDT 2026
ramfs creates symlinks with S_IRWXG only, so they show up as
'l---rwx---' in 'ls -l'. Permissions of symlinks are meaningless, Linux
always creates them with 0777. Do the same here.
Fixes: b283b72639 ("fs: ramfs: Switch to dentry cache implementation")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
fs/ramfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ramfs.c b/fs/ramfs.c
index c843df6c5c..4c64310e22 100644
--- a/fs/ramfs.c
+++ b/fs/ramfs.c
@@ -171,7 +171,7 @@ static int ramfs_symlink(struct inode *dir, struct dentry *dentry,
{
struct inode *inode;
- inode = ramfs_get_inode(dir->i_sb, dir, S_IFLNK | S_IRWXG);
+ inode = ramfs_get_inode(dir->i_sb, dir, S_IFLNK | S_IRWXUGO);
if (!inode)
return -ENOSPC;
--
2.47.3
More information about the barebox
mailing list