Re: [PATCH 08/10] NFS: Move do_vfs_lock to shared inline

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

 



On Thu, 22 Oct 2015, Christoph Hellwig wrote:

> On Wed, Oct 21, 2015 at 02:48:45PM -0700, Trond Myklebust wrote:
> > > > +static inline int do_vfs_lock(struct inode *inode, struct file_lock *fl)
> > > > +{
> > > > +     int res = 0;
> > > > +     switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) {
> > > > +             case FL_POSIX:
> > > > +                     res = posix_lock_inode_wait(inode, fl);
> > > > +                     break;
> > > > +             case FL_FLOCK:
> > > > +                     res = flock_lock_inode_wait(inode, fl);
> > > > +                     break;
> > > > +             default:
> > > > +                     BUG();
> > > > +     }
> > > > +     return res;
> > > > +}
>
> This is a) not a good name for a global function, and b) probably
> shouldn't be inline.
>
> Given how similar the functions are I'd rather have a
> file_lock_inode_wait that handles both cases right in fs/locks.c

Makes sense to me.. I'll do it.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux