mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/6] fs: ramfs: drop unneeded indirection during unlink
@ 2025-01-06  9:18 Ahmad Fatoum
  2025-01-06  9:18 ` [PATCH 2/6] fs: squashfs: delete unreferenced source file Ahmad Fatoum
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2025-01-06  9:18 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

ramfs_unlink and simple_unlink have the same prototype, so we can just
use simple_unlink directly instead of defining a trivial intermediate
function.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 fs/ramfs.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/ramfs.c b/fs/ramfs.c
index c1ef7acd9107..e34742e42959 100644
--- a/fs/ramfs.c
+++ b/fs/ramfs.c
@@ -164,11 +164,6 @@ static int ramfs_symlink(struct inode *dir, struct dentry *dentry,
 	return 0;
 }
 
-static int ramfs_unlink(struct inode *dir, struct dentry *dentry)
-{
-	return simple_unlink(dir, dentry);
-}
-
 static const char *ramfs_get_link(struct dentry *dentry, struct inode *inode)
 {
 	return inode->i_link;
@@ -185,7 +180,7 @@ static const struct inode_operations ramfs_dir_inode_operations =
 	.symlink = ramfs_symlink,
 	.mkdir = ramfs_mkdir,
 	.rmdir = simple_rmdir,
-	.unlink = ramfs_unlink,
+	.unlink = simple_unlink,
 	.create = ramfs_create,
 };
 
-- 
2.39.5




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-06 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-06  9:18 [PATCH 1/6] fs: ramfs: drop unneeded indirection during unlink Ahmad Fatoum
2025-01-06  9:18 ` [PATCH 2/6] fs: squashfs: delete unreferenced source file Ahmad Fatoum
2025-01-06  9:18 ` [PATCH 3/6] fs: collect legacy file system operation in new struct fs_legacy_ops Ahmad Fatoum
2025-01-06  9:18 ` [PATCH 4/6] fs: return error pointer not NULL from cdev_mount_default Ahmad Fatoum
2025-01-06  9:18 ` [PATCH 5/6] commands: stat: fix size display for FILE_SIZE_STREAM Ahmad Fatoum
2025-01-06  9:18 ` [PATCH 6/6] commands: stat: print mode in octal if type unknown Ahmad Fatoum
2025-01-06 10:40 ` [PATCH 1/6] fs: ramfs: drop unneeded indirection during unlink Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox