xfs
[Top] [All Lists]

Re: [PATCH 7/8] xfs: factor common write setup code

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 7/8] xfs: factor common write setup code
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 7 Jan 2011 20:20:58 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110107085357.GB10829@xxxxxxxxxxxxx>
References: <1294116518-14908-1-git-send-email-david@xxxxxxxxxxxxx> <1294116518-14908-8-git-send-email-david@xxxxxxxxxxxxx> <20110107085357.GB10829@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jan 07, 2011 at 03:53:57AM -0500, Christoph Hellwig wrote:
> On Tue, Jan 04, 2011 at 03:48:37PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > The buffered IO and direct Io write paths share a common set of
> > checks and limiting code prior to issuing the write. Factor that
> > into a common helper function.
> 
> Wouldn't it be better to create the helper before duplicating the code,
> aka move it before the buffer/direct splits in the series?

Maybe, but at this I'd prefer not to move it as it would mean having
to rework several other patches in the series as well.  Moving it
doesn't change the end result at all, so unless you feel really
strongly about this I'm going to say no this time because we're
now under time pressure to get this tested and finished for 2.6.38.

> > +   /*
> > +    * If we're writing the file then make sure to clear the setuid and
> > +    * setgid bits if the process is not being run by root.  This keeps
> > +    * people from modifying setuid and setgid binaries.
> > +    */
> > +   error = file_remove_suid(file);
> > +   return error;
> 
> just
> 
>       return file_remove_suid(file);

Yup, will fix.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>