Set sb->s_root to NULL when failing from __getname(),
so that we can avoid double dput and unnecessary operations
in generic_shutdown_super().
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/erofs/super.
unlikely has already included in IS_ERR(),
so just remove redundant likely/unlikely
annotation.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/namei.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c
unlikely has already included in IS_ERR(),
so just remove it.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/unzip_vle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/erofs/unzip_vle.c
b/drivers/staging/erofs/unzip_vle.c
index 4ac1099a39c6
Some error cases like failing from d_make_root() will
cause double iput because d_make_root() also does iput
in its error path.
Signed-off-by: Chengguang Xu
---
Only compile tested.
drivers/staging/erofs/super.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a
As a read only filesystem, it's better to show available
inode num as 0 in statfs.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.
Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
Reviewed-by: Gao Xiang
---
drivers/staging/erofs/super.c | 37
Add new helper erofs_get_fault_rate() to get fault rate instead of
directly getting it from sbi, so we can remove the macro check
surrounding it.
Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
Reviewed-by: Gao Xiang
---
drivers/staging/erofs/super.c | 14 +++---
1 file changed, 11
Define a dummpy function of erofs_build_fault_attr() when macro
CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to
check the macro in calling place. Based on above adjustment,
do proper code cleanup for option parsing of fault_injection.
Signed-off-by: Chengguang Xu
Review
e on latest erofs branch in Chao's linux tree.
- Fix building issue.
Chengguang Xu (3):
staging: erofs: code cleanup for option parsing of fault_injection
staging: erofs: code cleanup for erofs_show_options()
staging: erofs: option validation in remount
drive
Add new helper erofs_get_fault_rate() to get fault rate instead of
directly getting it from sbi, so we can remove the macro check
surrounding it.
Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
---
drivers/staging/erofs/super.c | 14 +++---
1 file changed, 11 insertions(+), 3
Define a dummpy function of erofs_build_fault_attr() when macro
CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to
check the macro in calling place. Based on above adjustment,
do proper code cleanup for option parsing of fault_injection.
Signed-off-by: Chengguang Xu
Review
on latest erofs branch in Chao's linux tree.
- Fix building issue.
Hi Greg,
You may pick up rest 2-4 patches in this patch set if there
are no more comments from Chao and Xiang.
Thanks,
Chengguang Xu (4):
staging: erofs: code cleanup for erofs_kmalloc()
staging: erofs: code cleanup
Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.
Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
---
drivers/staging/erofs/super.c | 38 ---
1 file changed
Define a dummy function of time_to_inject()/erofs_show_injection_info(),
so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in
calling place.
Signed-off-by: Chengguang Xu
Reviewed-by: Chao Yu
Reviewed-by: Gao Xiang
---
drivers/staging/erofs/internal.h | 13 ++---
1
Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers
Call erofs_get_fault_rate() to get fault rate instead of
directly getting it from sbi, so we can remove the macro
check surrounding it.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/erofs
Introduce a new helper for getting fault rate, so that we
don't have to check macro in calling place.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/su
Introduce a new helper __erofs_build_fault_attr() to handle set/clear
erofs_fault_info, we need this funciton for internal use case.
for example, reset fault_injection option in remount.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 25 +++--
1 file
Define a dummpy function of erofs_build_fault_attr() when macro
CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to
check the macro in calling place. Based on above adjustment,
do proper code cleanup for option parsing of fault_injection.
Signed-off-by: Chengguang Xu
---
dr
Define a dummy function of time_to_inject()/erofs_show_injection_info(),
so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in
calling place.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/internal.h | 13 ++---
1 file changed, 10 insertions(+), 3 dele
o the code looks clean and
more understandable.
v1->v2:
Address Chao's comments:
- Allow to set fault_injection=0.
- Keep flag bit when setting fault_injection=0.
- Show injection info in original place.
- Rebase code on latest erofs branch in Chao's linux tree.
- Fix building issue.
Introduce a new helper __erofs_build_fault_attr() to handle set/clear
erofs_fault_info, we need this funciton for internal use case.
for example, reset fault_injection option in remount.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 26 ++
1 file
Call erofs_get_fault_rate() to get fault rate instead of
directly getting it from sbi, so we can remove the macro
check surrounding it.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/erofs
Introduce a new helper for getting fault rate, so that we
don't have to check macro in calling place.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/su
Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers
Define a dummpy function of erofs_build_fault_attr() when macro
CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to
check the macro in calling place. Based on above adjustment,
do proper code cleanup for option parsing of fault_injection.
Signed-off-by: Chengguang Xu
---
dr
Set fault rate to 0 is useless and confusable, so add check to
avoid it.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index d2dbc1fd3abb..8df680aee55a 100644
Define a dummy function of time_to_inject(), so that we don't
have to check macro CONFIG_EROFS_FAULT_INJECTION in calling place.
Base on above adjustment, do proper code cleanup for erofs_kmalloc().
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/internal.h | 16 ++--
1
o the code looks clean and more
understandable.
Chengguang Xu (7):
staging: erofs: code cleanup for erofs_kmalloc()
staging: erofs: code cleanup for option parsing of fault_injection
staging: erofs: introduce a new helper __erofs_build_fault_attr()
staging: erofs: return -EINVAL when speci
Add option validation in remount. After this patch, remount
can change recognized options, and for unknown options remount
will fail and report error.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/drivers
ption POSIX_ACL and FS_XATTR.
Signed-off-by: Chengguang Xu
---
v1->v2:
- modify warning message.
drivers/staging/erofs/super.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 1aec509c805f..4ad55dcb8e6
ption POSIX_ACL and FS_XATTR.
Signed-off-by: Chengguang Xu
---
drivers/staging/erofs/super.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 1aec509c805f..4004a00d150d 100644
--- a/drivers/staging/erofs/su
32 matches
Mail list logo