From: Eric Sandeen Date: Fri, 17 Feb 2012 20:42:08 +0000 (-0600) Subject: xfs_io: skip FSGEOMETRY call in openfile if no geom var present X-Git-Tag: v3.1.8~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bc7dfb22c8179580e5223f2c6194803478d769b;p=thirdparty%2Fxfsprogs-dev.git xfs_io: skip FSGEOMETRY call in openfile if no geom var present sendfile_f() calls openfile() with NULL *geom even if it's on an xfs filesystem, so we need to skip the ioctl if (!geom). Fixes regression from d1b88183bb3fc5e338746db53269310348646753 Reported-by: Christoph Hellwig Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- diff --git a/io/open.c b/io/open.c index 97631e22e..ac39ccc5b 100644 --- a/io/open.c +++ b/io/open.c @@ -163,7 +163,7 @@ openfile( } } - if (!platform_test_xfs_fd(fd)) + if (!geom || !platform_test_xfs_fd(fd)) return fd; if (xfsctl(path, fd, XFS_IOC_FSGEOMETRY, geom) < 0) {