summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b85ea5b)
This function is short and has only a single caller. The code becomes
clearer by open-coding it in the caller.
-static void mmd_dup(struct misc_meta_data *new_mmd)
-{
- mutex_lock(mmd_mutex);
- *new_mmd = *mmd;
- mutex_unlock(mmd_mutex);
-}
-
/*
* Compute human readable vss status text.
*
/*
* Compute human readable vss status text.
*
if (i != cc->argc)
return -E_COMMAND_SYNTAX;
for (;;) {
if (i != cc->argc)
return -E_COMMAND_SYNTAX;
for (;;) {
+ /*
+ * Copy the mmd structure to minimize the time we hold the mmd
+ * lock.
+ */
+ mutex_lock(mmd_mutex);
+ *nmmd = *mmd;
+ mutex_unlock(mmd_mutex);
ret = get_status(nmmd, parser_friendly, &s);
ret = send_sb(&cc->scc, s, ret, SBD_OUTPUT, false);
if (ret < 0)
ret = get_status(nmmd, parser_friendly, &s);
ret = send_sb(&cc->scc, s, ret, SBD_OUTPUT, false);
if (ret < 0)