From: Artem Bityutskiy Date: Thu, 26 May 2011 06:43:34 +0000 (+0300) Subject: UBIFS: minor cleanup: use S_ISREG helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a29fa9dfa4d5d1b962825c79f19d9b6f3f15843b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Artem Bityutskiy --- diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index de82c5d04ab9..285038548da9 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -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)) {