Skip to content

Commit

Permalink
fs/bad_inode.c: is_bad_inode can be boolean
Browse files Browse the repository at this point in the history
This patch makes is_bad_inode return bool to improve
readability due to this particular function only using either
one or zero as its return value.

No functional change.

Signed-off-by: Yaowei Bai <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Yaowei Bai authored and Al Viro committed Dec 7, 2015
1 parent a6e5787 commit 0e3ef1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/bad_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ EXPORT_SYMBOL(make_bad_inode);
* Returns true if the inode in question has been marked as bad.
*/

int is_bad_inode(struct inode *inode)
bool is_bad_inode(struct inode *inode)
{
return (inode->i_op == &bad_inode_ops);
}
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@ extern void init_special_inode(struct inode *, umode_t, dev_t);

/* Invalid inode operations -- fs/bad_inode.c */
extern void make_bad_inode(struct inode *);
extern int is_bad_inode(struct inode *);
extern bool is_bad_inode(struct inode *);

#ifdef CONFIG_BLOCK
/*
Expand Down

0 comments on commit 0e3ef1f

Please sign in to comment.