ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH v3 1/6] fs: add i_blockmask()
@ 2023-03-09 15:21 Yangtao Li via Ocfs2-devel
  2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 2/6] erofs: convert to use i_blockmask() Yangtao Li via Ocfs2-devel
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Yangtao Li via Ocfs2-devel @ 2023-03-09 15:21 UTC (permalink / raw)
  To: xiang, chao, huyue2, jefflexu, tytso, adilger.kernel, rpeterso,
	agruenba, mark, jlbec, joseph.qi, viro, brauner
  Cc: Yangtao Li, linux-kernel, cluster-devel, linux-fsdevel,
	linux-ext4, linux-erofs, ocfs2-devel

Introduce i_blockmask() to simplify code, which replace
(i_blocksize(node) - 1). Like done in commit
93407472a21b("fs: add i_blocksize()").

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
v3:
-none
v2:
-convert to i_blockmask()
 include/linux/fs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index c85916e9f7db..17387d465b8b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -711,6 +711,11 @@ static inline unsigned int i_blocksize(const struct inode *node)
 	return (1 << node->i_blkbits);
 }
 
+static inline unsigned int i_blockmask(const struct inode *node)
+{
+	return i_blocksize(node) - 1;
+}
+
 static inline int inode_unhashed(struct inode *inode)
 {
 	return hlist_unhashed(&inode->i_hash);
-- 
2.25.1


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

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

end of thread, other threads:[~2023-03-22 17:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 15:21 [Ocfs2-devel] [PATCH v3 1/6] fs: add i_blockmask() Yangtao Li via Ocfs2-devel
2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 2/6] erofs: convert to use i_blockmask() Yangtao Li via Ocfs2-devel
2023-03-10  3:15   ` Al Viro via Ocfs2-devel
2023-03-10  3:42     ` Gao Xiang via Ocfs2-devel
2023-03-10  3:47       ` Gao Xiang via Ocfs2-devel
2023-03-10  3:51     ` [Ocfs2-devel] " Yangtao Li via Ocfs2-devel
2023-03-10  4:05       ` Al Viro via Ocfs2-devel
2023-03-10  6:50         ` Yangtao Li via Ocfs2-devel
2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 3/6] gfs2: " Yangtao Li via Ocfs2-devel
2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 4/6] ext4: " Yangtao Li via Ocfs2-devel
2023-03-10  3:19   ` Al Viro via Ocfs2-devel
2023-03-10  3:32     ` Al Viro via Ocfs2-devel
2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 5/6] ocfs2: " Yangtao Li via Ocfs2-devel
2023-03-10  3:26   ` Al Viro via Ocfs2-devel
2023-03-09 15:21 ` [Ocfs2-devel] [PATCH v3 6/6] fs/remap_range: " Yangtao Li via Ocfs2-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).