lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 1/1] fs/namespace.c: use spinlock instead of busy loop
    On Wed, Jun 17, 2020 at 12:46:58PM +0206, John Ogness wrote:
    > @@ -459,17 +469,39 @@ void mnt_drop_write_file(struct file *file)
    > }
    > EXPORT_SYMBOL(mnt_drop_write_file);
    >
    > +static void mnt_lock_writers(struct mount *mnt)
    > +{
    > +#ifdef CONFIG_SMP
    > + int cpu;
    > +
    > + for_each_possible_cpu(cpu) {
    > + spin_lock(&per_cpu_ptr(mnt->mnt_pcp,
    > + cpu)->mnt_writers_lock);
    > + }
    > +#else
    > + spin_lock(&mnt->mnt_writers_lock);
    > +#endif
    > +}
    > +
    > +static void mnt_unlock_writers(struct mount *mnt)
    > +{
    > +#ifdef CONFIG_SMP
    > + int cpu;
    > +
    > + for_each_possible_cpu(cpu) {
    > + spin_unlock(&per_cpu_ptr(mnt->mnt_pcp,
    > + cpu)->mnt_writers_lock);
    > + }
    > +#else
    > + spin_unlock(&mnt->mnt_writers_lock);
    > +#endif
    > +}

    *groan*.. this is brlock reincarnate :-/ Also broken.


    \
     
     \ /
      Last update: 2020-06-17 13:26    [W:4.659 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site