[PATCH 6/9] xfs: XFS_IOCTL_SETXATTR can run in user namespaces
Dave Chinner
david at fromorbit.com
Fri Jan 30 01:44:16 CST 2015
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 at fromorbit.com
More information about the xfs
mailing list