[PATCH 2/2] vfs: clean up d_backing_inode() function

From: Haifeng Xu
Date: Wed Apr 19 2023 - 03:28:17 EST


Using an extra variable to record the inode is unnecessary, return it
directly.

Signed-off-by: Haifeng Xu <haifeng.xu@xxxxxxxxxx>
---
include/linux/dcache.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 13023c7211d6..97324b6434e5 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -540,9 +540,7 @@ static inline struct inode *d_inode_rcu(const struct dentry *dentry)
*/
static inline struct inode *d_backing_inode(const struct dentry *upper)
{
- struct inode *inode = upper->d_inode;
-
- return inode;
+ return upper->d_inode;
}

/**
--
2.25.1