Whamcloud - gitweb
LU-4423 lustre: convert rsi_sem to a spinlock.
[fs/lustre-release.git] / lustre / mdt / mdt_lproc.c
index 9bc2522..6e502f2 100644 (file)
@@ -567,7 +567,7 @@ static int mdt_nosquash_nids_seq_show(struct seq_file *m, void *data)
        struct root_squash_info *squash = &mdt->mdt_squash;
        int len = 0;
 
-       down_read(&squash->rsi_sem);
+       spin_lock(&squash->rsi_lock);
        if (!list_empty(&squash->rsi_nosquash_nids)) {
                len = cfs_print_nidlist(m->buf + m->count, m->size - m->count,
                                        &squash->rsi_nosquash_nids);
@@ -575,7 +575,7 @@ static int mdt_nosquash_nids_seq_show(struct seq_file *m, void *data)
                seq_putc(m, '\n');
        } else
                seq_puts(m, "NONE\n");
-       up_read(&squash->rsi_sem);
+       spin_unlock(&squash->rsi_lock);
 
        return 0;
 }