提交 a29fa9df 编写于 作者: A Artem Bityutskiy 提交者: Artem Bityutskiy

UBIFS: minor cleanup: use S_ISREG helper

Instead of using long "(inode->i_mode & S_IFMT) != S_IFREG" expression, use
shorted "!S_ISREG(inode->i_mode)".
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 1b51e983
......@@ -85,7 +85,7 @@ static int validate_inode(struct ubifs_info *c, const struct inode *inode)
if (ui->data_len < 0 || ui->data_len > UBIFS_MAX_INO_DATA)
return 4;
if (ui->xattr && (inode->i_mode & S_IFMT) != S_IFREG)
if (ui->xattr && !S_ISREG(inode->i_mode))
return 5;
if (!ubifs_compr_present(ui->compr_type)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册