Re: [PATCH 7/7] fs: Do not overload update_time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 2, 2019 at 9:48 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Fri, Nov 29, 2019 at 09:30:30PM -0800, Deepa Dinamani wrote:
> > -     int (*update_time)(struct inode *, struct timespec64 *, int);
> > +     int (*cb)(struct inode *, struct timespec64 *, int);
> >
> > -     update_time = inode->i_op->update_time ? inode->i_op->update_time :
> > +     cb = inode->i_op->update_time ? inode->i_op->update_time :
> >               generic_update_time;
> >
> > -     return update_time(inode, time, flags);
> > +     return cb(inode, time, flags);
>
> Just killing the pointless local variable cleans the function op, and
> also avoids the expensive indirect call for the common case:

Will update this in v2. Thanks.

-Deepa



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux