| To: | Brian Foster <bfoster@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 6/9] xfs: XFS_IOCTL_SETXATTR can run in user namespaces |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Fri, 30 Jan 2015 18:44:16 +1100 |
| Cc: | xfs@xxxxxxxxxxx, iustin@xxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20150130030411.GA22916@xxxxxxxxxxxxxxx> |
| References: | <1422328486-24661-1-git-send-email-david@xxxxxxxxxxxxx> <1422328486-24661-7-git-send-email-david@xxxxxxxxxxxxx> <20150129153515.GF17652@xxxxxxxxxxxxxx> <20150129235315.GG6282@dastard> <20150130030411.GA22916@xxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Thu, Jan 29, 2015 at 10:04:11PM -0500, Brian Foster wrote: > On Fri, Jan 30, 2015 at 10:53:15AM +1100, Dave Chinner wrote: > > On Thu, Jan 29, 2015 at 10:35:15AM -0500, Brian Foster wrote: > > > Why not use != here? Looks fine, anyways: > > > > Because ^ has an implicit cast of the variables to boolean (i.e flag > > set or not), whereas != will only work if XFS_XFLAG_PROJINHERIT = > > XFS_DIFLAG_PROJINHERIT. Given that the moment we add more DIFLAGs to > > the xfs inode, the current "XFLAG value must match DIFLAG value" > > rule is going to be broken, I think that logical evaluation is a > > much safer practice for these types of comparisons. > > > > Hrm, I'm not following how a boolean cast occurs here. Isn't ^ a bitwise > operation? Ah, yes, you are right. I'mi not sure what type of crack I was smoking this morning (or when I wrote it). I'll fix it up.... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] libxfs: report VERSION in libxfs_fs_repair_cmn_err(), Eric Sandeen |
|---|---|
| Next by Date: | Re: [PATCH 2/2] xfs_spaceman: Accounting for AGFL blocks, Dhruvesh Rathore |
| Previous by Thread: | Re: [PATCH 6/9] xfs: XFS_IOCTL_SETXATTR can run in user namespaces, Brian Foster |
| Next by Thread: | Re: [PATCH 0/9] xfs: xfs_ioctl_setxattr rework, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |