Skip to content

Commit

Permalink
UBIFS: minor cleanup: use S_ISREG helper
Browse files Browse the repository at this point in the history
Instead of using long "(inode->i_mode & S_IFMT) != S_IFREG" expression, use
shorted "!S_ISREG(inode->i_mode)".

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 4, 2011
1 parent 1b51e98 commit a29fa9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a29fa9d

Please sign in to comment.