Skip to content

Commit 103cfcf

Browse files
error27konis
authored andcommitted
nilfs2: nilfs_iget_for_gc() returns ERR_PTR
nilfs_iget_for_gc() returns an ERR_PTR() on failure and doesn't return NULL. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
1 parent 3561d43 commit 103cfcf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/nilfs2/ioctl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ static int nilfs_ioctl_move_blocks(struct super_block *sb,
349349
ino = vdesc->vd_ino;
350350
cno = vdesc->vd_cno;
351351
inode = nilfs_iget_for_gc(sb, ino, cno);
352-
if (unlikely(inode == NULL)) {
353-
ret = -ENOMEM;
352+
if (IS_ERR(inode)) {
353+
ret = PTR_ERR(inode);
354354
goto failed;
355355
}
356356
do {

0 commit comments

Comments
 (0)