All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] vfs: clean up d_backing_inode() function
@ 2023-04-19  7:27 Haifeng Xu
  2023-04-19  8:05 ` Miklos Szeredi
  0 siblings, 1 reply; 7+ messages in thread
From: Haifeng Xu @ 2023-04-19  7:27 UTC (permalink / raw)
  To: viro; +Cc: bigeasy, mcgrof, mszeredi, xiubli, linux-kernel, Haifeng Xu

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

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 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


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

end of thread, other threads:[~2023-04-21  3:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19  7:27 [PATCH 2/2] vfs: clean up d_backing_inode() function Haifeng Xu
2023-04-19  8:05 ` Miklos Szeredi
2023-04-19  9:32   ` Haifeng Xu
2023-04-19 10:47   ` [PATCH v2 " Haifeng Xu
2023-04-20 20:45     ` Al Viro
2023-04-21  2:50       ` Haifeng Xu
2023-04-21  3:34         ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.