From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/6] fs: ramfs: drop unneeded indirection during unlink
Date: Mon, 6 Jan 2025 10:18:30 +0100 [thread overview]
Message-ID: <20250106091835.3434836-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2025-01-06 9:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 9:18 Ahmad Fatoum [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250106091835.3434836-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox