]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: skip FSGEOMETRY call in openfile if no geom var present
authorEric Sandeen <sandeen@sandeen.net>
Fri, 17 Feb 2012 20:42:08 +0000 (14:42 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 17 Feb 2012 20:42:08 +0000 (14:42 -0600)
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 <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
io/open.c

index 97631e22e177452ca6ae46d01ca5ef995f74ef5f..ac39ccc5b736aa2d6e937fa08fe6247738b5625b 100644 (file)
--- 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) {