lkml.org 
[lkml]   [2013]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRE: [PATCH 0/2] fs: supply inode uid/gid setting interface
    Date
    From
    > Subject: Re: [PATCH 0/2] fs: supply inode uid/gid setting interface
    >
    > On 2013/8/23 12:10, Greg KH wrote:
    > > On Fri, Aug 23, 2013 at 10:48:36AM +0800, Rui Xiang wrote:
    > >> This patchset implements an accessor functions to set uid/gid
    > >> in inode struct. Just finish code clean up.
    > >
    > > Why?
    > >
    > It can introduce a new function to reduce some codes.
    > Just clean up.

    In what sense is it a 'cleanup' ?

    To my mind it just means that anyone reading the code has
    to go and look at another file in order to see what the
    function does (it might be expected to be more complex).

    It also adds run time cost, while probably not directly
    measurable I suspect it more than doubles the execution
    time of that code fragment - do that everywhere and the
    system will run like a sick pig.

    The only real use for accessor functions is when you
    don't want the structure offset to be public.
    In this case that is obviously not the case since
    all the drivers are directly accessing other members
    of the structure.

    David





    \
     
     \ /
      Last update: 2013-08-27 11:41    [W:3.032 / U:0.944 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site