|
@@ -286,8 +286,10 @@ static ssize_t f2fs_sbi_store(struct f2fs_attr *a,
|
|
|
bool gc_entry = (!strcmp(a->attr.name, "gc_urgent") ||
|
|
|
a->struct_type == GC_THREAD);
|
|
|
|
|
|
- if (gc_entry)
|
|
|
- down_read(&sbi->sb->s_umount);
|
|
|
+ if (gc_entry) {
|
|
|
+ if (!down_read_trylock(&sbi->sb->s_umount))
|
|
|
+ return -EAGAIN;
|
|
|
+ }
|
|
|
ret = __sbi_store(a, sbi, buf, count);
|
|
|
if (gc_entry)
|
|
|
up_read(&sbi->sb->s_umount);
|