[XFS] Handle null returned from xfs_vtoi() in xfs_setfilesize().
authorDavid Chinner <dgc@sgi.com>
Tue, 5 Jun 2007 06:24:44 +0000 (16:24 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Sat, 14 Jul 2007 05:31:03 +0000 (15:31 +1000)
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>
fs/xfs/linux-2.6/xfs_aops.c

index 80a3214..c097e4e 100644 (file)
@@ -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);