浏览代码

[XFS] Handle null returned from xfs_vtoi() in xfs_setfilesize().

SGI-PV: 965636
SGI-Modid: xfs-linux-melb:xfs-kern:28777a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
David Chinner 18 年之前
父节点
当前提交
b2826136a1
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/xfs/linux-2.6/xfs_aops.c

+ 2 - 0
fs/xfs/linux-2.6/xfs_aops.c

@@ -161,6 +161,8 @@ xfs_setfilesize(
 	xfs_fsize_t		bsize;
 
 	ip = xfs_vtoi(ioend->io_vnode);
+	if (!ip)
+		return;
 
 	ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG);
 	ASSERT(ioend->io_type != IOMAP_READ);