Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352983
b: refs/heads/master
c: e59310a
h: refs/heads/master
i:
  352981: 4fd0f46
  352979: 0e7bcde
  352975: a27f57c
v: v3
  • Loading branch information
Seiji Aguchi authored and Tony Luck committed Jan 11, 2013
1 parent dd4f29b commit dc06543
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f244e9cfd70c7c0f82d3c92ce772ab2a92d9f64
refs/heads/master: e59310adf5eebce108f78b6c47bb330aae2e1666
11 changes: 10 additions & 1 deletion trunk/drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,16 @@ static int efi_pstore_write(enum pstore_type_id type,
u64 storage_space, remaining_space, max_variable_size;
efi_status_t status = EFI_NOT_FOUND;

spin_lock(&efivars->lock);
if (pstore_cannot_block_path(reason)) {
/*
* If the lock is taken by another cpu in non-blocking path,
* this driver returns without entering firmware to avoid
* hanging up.
*/
if (!spin_trylock(&efivars->lock))
return -EBUSY;
} else
spin_lock(&efivars->lock);

/*
* Check if there is a space enough to log.
Expand Down

0 comments on commit dc06543

Please sign in to comment.