From: David Chinner Date: Tue, 5 Jun 2007 06:24:44 +0000 (+1000) Subject: [XFS] Handle null returned from xfs_vtoi() in xfs_setfilesize(). X-Git-Tag: v2.6.23-rc1~1056^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2826136a1fc3ea451bcbb73a75ca50b3231aa8f;p=linux-2.6 [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 Signed-off-by: Olaf Weber Signed-off-by: Tim Shimmin --- diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 80a3214623..c097e4e697 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/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);