the value of
c->lhead_offs is far less than c->leb_size. The check
'if (c->lhead_offs == c->leb_size)' could never to be true.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
v2: Improve description and code as suggestted by Richard.
fs/ubifs/log.c | 5 +
1
The value of c->lhead_offs cannot exceed max_len which much
smaller than c->leb_size. So the check will never be true.
Just remove it.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
fs/ubifs/log.c | 4
1 file changed, 4 deletions(-)
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c
Even though we protect on-flash data by CRC checksums,
we still don't trust the media. If lnum is not 0 or 1,
access exceed array boundary can lead to bad situation.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
v2: fix the name in *From*.
drivers/mtd/ubi/vtbl.c | 4
1 file ch
From: fishland
Even though we protect on-flash data by CRC checksums,
we still don't trust the media. If lnum is not 0 or 1,
access exceed array boundary can lead to bad situation.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
drivers/mtd/ubi/vtbl.c | 4
1 file chang
"Not a CS node" makes more sense than "Node a CS node".
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
fs/ubifs/recovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 3af4472061cc..400163dc7022 1
cbuf's size can be simply assigned.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
fs/ubifs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index c5466c7..1a8e2032 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/su
After testing, it can effectively solve the deadlock
bug.
Reported-by: Yang Yi
Signed-off-by: Liu Song
Tested-by: Yang Yi
Reviewed-by: Jiang Biao
---
fs/jffs2/build.c | 1 +
fs/jffs2/dir.c | 22 +-
fs/jffs2/gc.c | 4
fs/jffs2/jffs2_fs_sb.h | 1 +
Merge the duplicated complex conditions to improve code readability.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
fs/ext4/inode.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7d6c100..c2bc1fd 100644
--- a/fs
Local var sum is only used in one branch, and it may be not used if
it is defined outside the branch. Try to move the definition into
the branch to make it closer to where it is actually used.
Signed-off-by: Liu Song
Reviewed-by: Jiang Biao
---
fs/ubifs/find.c | 3 ++-
1 file changed, 2
In jffs2_do_setattr, we hold two mutexes which are
A) c->alloc_sem
B) f->sem
If new_metadata is error, then we release mutexes in bad sequence
which could cause ABAB deadlock.
This patch adjusts release sequence which could avoid deadlock.
Signed-off-by: Liu Song
Reviewed-by: Jian
10 matches
Mail list logo