Skip to content

Commit c30b20c

Browse files
committed
pstore: Rename "pstore_lock" to "psinfo_lock"
The name "pstore_lock" sounds very global, but it is only supposed to be used for managing changes to "psinfo", so rename it accordingly. Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Kees Cook <[email protected]>
1 parent e7c1c00 commit c30b20c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/pstore/platform.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ static void pstore_dowork(struct work_struct *);
6969
static DECLARE_WORK(pstore_work, pstore_dowork);
7070

7171
/*
72-
* pstore_lock just protects "psinfo" during
72+
* psinfo_lock just protects "psinfo" during
7373
* calls to pstore_register()
7474
*/
75-
static DEFINE_SPINLOCK(pstore_lock);
75+
static DEFINE_SPINLOCK(psinfo_lock);
7676
struct pstore_info *psinfo;
7777

7878
static char *backend;
@@ -574,11 +574,11 @@ int pstore_register(struct pstore_info *psi)
574574
return -EINVAL;
575575
}
576576

577-
spin_lock(&pstore_lock);
577+
spin_lock(&psinfo_lock);
578578
if (psinfo) {
579579
pr_warn("backend '%s' already loaded: ignoring '%s'\n",
580580
psinfo->name, psi->name);
581-
spin_unlock(&pstore_lock);
581+
spin_unlock(&psinfo_lock);
582582
return -EBUSY;
583583
}
584584

@@ -587,7 +587,7 @@ int pstore_register(struct pstore_info *psi)
587587
psinfo = psi;
588588
mutex_init(&psinfo->read_mutex);
589589
sema_init(&psinfo->buf_lock, 1);
590-
spin_unlock(&pstore_lock);
590+
spin_unlock(&psinfo_lock);
591591

592592

593593
if (psi->flags & PSTORE_FLAGS_DMESG)

0 commit comments

Comments
 (0)