public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: skip FSGEOMETRY call in openfile if no geom var present
@ 2012-02-14 18:37 Eric Sandeen
  2012-02-17 17:21 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2012-02-14 18:37 UTC (permalink / raw)
  To: xfs-oss, Christoph Hellwig

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>
---

diff --git a/io/open.c b/io/open.c
index 97631e2..ac39ccc 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) {

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfsprogs: skip FSGEOMETRY call in openfile if no geom var present
  2012-02-14 18:37 [PATCH] xfsprogs: skip FSGEOMETRY call in openfile if no geom var present Eric Sandeen
@ 2012-02-17 17:21 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2012-02-17 17:21 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Christoph Hellwig, xfs-oss

On Tue, Feb 14, 2012 at 10:37:55AM -0800, Eric Sandeen wrote:
> 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>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-17 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 18:37 [PATCH] xfsprogs: skip FSGEOMETRY call in openfile if no geom var present Eric Sandeen
2012-02-17 17:21 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox