Skip to contentSkip to conversation

staging: erofs: remove unsupported ->datamode check in fill_inline_data()

PATCH New Yue Hu 2 participants 3 messages Jun 25, 2019 Staging

lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH 1/1 staging: erofs: remove unsupported ->datamode check in fill_inline_data()

From: Yue Hu <[email protected]>

Already check if ->datamode is supported in read_inode(), no need to check again in the next fill_inline_data() only called by fill_inode().

Signed-off-by Yue Hu <huyue2 at yulong.com>
---
 drivers/staging/erofs/inode.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/erofs/inode.c +0 -2
index e51348f..d6e1e16 100644
@@ -129,8 +129,6 @@ static int fill_inline_data(struct inode *inode, void *data,
 	struct erofs_sb_info *sbi = EROFS_I_SB(inode);
 	const int mode = vi->datamode;
 
-	DBG_BUGON(mode >= EROFS_INODE_LAYOUT_MAX);
-
 	/* should be inode inline C */
 	if (mode != EROFS_INODE_LAYOUT_INLINE)
 		return 0;
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 staging: erofs: remove unsupported ->datamode check in fill_inline_data()

Hi Yue,

On 2019/6/25 ????2:14, Yue Hu Wrote:

Quoted 7 lines

From: Yue Hu <huyue2 at yulong.com>

Already check if ->datamode is supported in read_inode(), no need to check again in the next fill_inline_data() only called by fill_inode().

Signed-off-by Yue Hu <huyue2 at yulong.com>

---

Is there any difference between two patches?

Thanks,
Gao Xiang

Quoted 17 lines
 drivers/staging/erofs/inode.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/erofs/inode.c +0 -2
index e51348f..d6e1e16 100644
@@ -129,8 +129,6 @@ static int fill_inline_data(struct inode *inode, void *data,
 	struct erofs_sb_info *sbi = EROFS_I_SB(inode);
 	const int mode = vi->datamode;
 
-	DBG_BUGON(mode >= EROFS_INODE_LAYOUT_MAX);
-
 	/* should be inode inline C */
 	if (mode != EROFS_INODE_LAYOUT_INLINE)
 		return 0;
author
#2 lore raw

PATCH 1/1 staging: erofs: remove unsupported ->datamode check in fill_inline_data()

Quoted 5 lines · On Tue, 25 Jun 2019 15:13:49 +0800 Gao Xiang <[email protected]> wrote:

Hi Yue,

On 2019/6/25 ????2:14, Yue Hu Wrote:

Quoted 2 lines

From: Yue Hu <huyue2 at yulong.com>

Quoted 7 lines
Quoted 5 lines

Already check if ->datamode is supported in read_inode(), no need to check again in the next fill_inline_data() only called by fill_inode().

Signed-off-by: Yue Hu <huyue2 at yulong.com>
---

Is there any difference between two patches?

No. Sorry to send twice due to unstable network enviroment in my side.

Thx.

Quoted 21 lines

Thanks,
Gao Xiang

Quoted 17 lines
 drivers/staging/erofs/inode.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/erofs/inode.c +0 -2
index e51348f..d6e1e16 100644
@@ -129,8 +129,6 @@ static int fill_inline_data(struct inode *inode, void *data,
 	struct erofs_sb_info *sbi = EROFS_I_SB(inode);
 	const int mode = vi->datamode;
 
-	DBG_BUGON(mode >= EROFS_INODE_LAYOUT_MAX);
-
 	/* should be inode inline C */
 	if (mode != EROFS_INODE_LAYOUT_INLINE)
 		return 0;