summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-11-23 07:26:02 +0100
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-11-23 08:32:19 +0100
commit103cfcf522cefe00d8c322c6beac9a711acbf235 (patch)
tree92199ed8ad67cd128f9899e644361a7c4504467a /fs
parentLinux 2.6.37-rc3 (diff)
downloadlinux-103cfcf522cefe00d8c322c6beac9a711acbf235.tar.xz
linux-103cfcf522cefe00d8c322c6beac9a711acbf235.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nilfs2/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 3e90f86d5bfe..e00d9457c256 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -349,8 +349,8 @@ static int nilfs_ioctl_move_blocks(struct super_block *sb,
ino = vdesc->vd_ino;
cno = vdesc->vd_cno;
inode = nilfs_iget_for_gc(sb, ino, cno);
- if (unlikely(inode == NULL)) {
- ret = -ENOMEM;
+ if (IS_ERR(inode)) {
+ ret = PTR_ERR(inode);
goto failed;
}
do {