[06/76] ipc: Use inode_sb() helper instead of inode->i_sb
diff mbox

Message ID 20180508180436.716-7-mfasheh@suse.de
State New
Headers show

Commit Message

Mark Fasheh May 8, 2018, 6:03 p.m. UTC
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
---
 ipc/mqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index a808f29d4c5a..ac65b309c393 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -106,7 +106,7 @@  static inline struct mqueue_inode_info *MQUEUE_I(struct inode *inode)
  */
 static inline struct ipc_namespace *__get_ns_from_inode(struct inode *inode)
 {
-	return get_ipc_ns(inode->i_sb->s_fs_info);
+	return get_ipc_ns(inode_sb(inode)->s_fs_info);
 }
 
 static struct ipc_namespace *get_ns_from_inode(struct inode *inode)
@@ -456,7 +456,7 @@  static int mqueue_create_attr(struct dentry *dentry, umode_t mode, void *arg)
 	ipc_ns->mq_queues_count++;
 	spin_unlock(&mq_lock);
 
-	inode = mqueue_get_inode(dir->i_sb, ipc_ns, mode, attr);
+	inode = mqueue_get_inode(inode_sb(dir), ipc_ns, mode, attr);
 	if (IS_ERR(inode)) {
 		error = PTR_ERR(inode);
 		spin_lock(&mq_lock);