Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Zhi Yong Wu
On Sat, Dec 14, 2013 at 7:20 PM, Jeff Liu wrote: > On 12/14 2013 00:32 AM, Christoph Hellwig wrote: >>> +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 >>> +

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Jeff Liu
On 12/14 2013 00:32 AM, Christoph Hellwig wrote: >> +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; >> +} > > You could

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Jeff Liu
On 12/14 2013 00:32 AM, Christoph Hellwig wrote: +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; +} You could skip the else

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Zhi Yong Wu
On Sat, Dec 14, 2013 at 7:20 PM, Jeff Liu jeff@oracle.com wrote: On 12/14 2013 00:32 AM, Christoph Hellwig wrote: +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 +

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-13 Thread Christoph Hellwig
> +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; > +} You could skip the else here. Otherwise looks good, Reviewed-by:

[PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-13 Thread Zhi Yong Wu
From: Zhi Yong Wu It will be reused by the O_TMPFILE creation function. Signed-off-by: Zhi Yong Wu --- 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 ---

[PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-13 Thread Zhi Yong Wu
From: Zhi Yong Wu wu...@linux.vnet.ibm.com It will be reused by the O_TMPFILE creation function. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/xfs/xfs_inode.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_inode.c

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-13 Thread Christoph Hellwig
+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; +} You could skip the else here. Otherwise looks good, Reviewed-by: