]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: avoid BUG_ON from check_nid_range and update return path in do_read_inode
authorNamjae Jeon <namjae.jeon@samsung.com>
Sun, 17 Mar 2013 08:27:20 +0000 (17:27 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Wed, 20 Mar 2013 09:30:16 +0000 (18:30 +0900)
commit75e7d5c4c2747d640a8eaacb59dd5a46a3f2682d
tree23c98e917ce8aaf3b5b0ee8a58da5701d7667a70
parent5817d25d622b10a073bf4234a05e5f83dfed91d5
f2fs: avoid BUG_ON from check_nid_range and update return path in do_read_inode

In function check_nid_range, there is no need to trigger BUG_ON and make kernel stop.
Instead it could just check and indicate the inode number to be EINVAL.
Update the return path in do_read_inode to use the return from check_nid_range.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
[Jaegeuk: replace BUG_ON with WARN_ON]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/f2fs.h
fs/f2fs/inode.c