[PATCH 1/6] fs: ramfs: drop unneeded indirection during unlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux