[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1386944873-16796-2-git-send-email-zwu.kernel@gmail.com>
Date: Fri, 13 Dec 2013 22:27:49 +0800
From: Zhi Yong Wu <zwu.kernel@...il.com>
To: xfs@....sgi.com
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Subject: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()
From: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
It will be reused by the O_TMPFILE creation function.
Signed-off-by: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
---
fs/xfs/xfs_inode.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 001aa89..e8b9a68 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1139,6 +1139,14 @@ xfs_bumplink(
return 0;
}
+static inline prid_t xfs_get_initial_prid(struct xfs_inode *dp)
+{
+ if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
+ return xfs_get_projid(dp);
+ else
+ return XFS_PROJID_DEFAULT;
+}
+
int
xfs_create(
xfs_inode_t *dp,
@@ -1169,10 +1177,7 @@ xfs_create(
if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO);
- if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
- prid = xfs_get_projid(dp);
- else
- prid = XFS_PROJID_DEFAULT;
+ prid = xfs_get_initial_prid(dp);
/*
* Make sure that we have allocated dquot(s) on disk.
--
1.7.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists