Skip to content

Commit

Permalink
pstore: Rename "pstore_lock" to "psinfo_lock"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kees committed May 12, 2020
1 parent e7c1c00 commit c30b20c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ static void pstore_dowork(struct work_struct *);
static DECLARE_WORK(pstore_work, pstore_dowork);

/*
* pstore_lock just protects "psinfo" during
* psinfo_lock just protects "psinfo" during
* calls to pstore_register()
*/
static DEFINE_SPINLOCK(pstore_lock);
static DEFINE_SPINLOCK(psinfo_lock);
struct pstore_info *psinfo;

static char *backend;
Expand Down Expand Up @@ -574,11 +574,11 @@ int pstore_register(struct pstore_info *psi)
return -EINVAL;
}

spin_lock(&pstore_lock);
spin_lock(&psinfo_lock);
if (psinfo) {
pr_warn("backend '%s' already loaded: ignoring '%s'\n",
psinfo->name, psi->name);
spin_unlock(&pstore_lock);
spin_unlock(&psinfo_lock);
return -EBUSY;
}

Expand All @@ -587,7 +587,7 @@ int pstore_register(struct pstore_info *psi)
psinfo = psi;
mutex_init(&psinfo->read_mutex);
sema_init(&psinfo->buf_lock, 1);
spin_unlock(&pstore_lock);
spin_unlock(&psinfo_lock);


if (psi->flags & PSTORE_FLAGS_DMESG)
Expand Down

0 comments on commit c30b20c

Please sign in to comment.