Skip to contentSkip to conversation

xfsprogs: skip FSGEOMETRY call in openfile if no geom var present

PATCH In review Eric Sandeen 2 participants 2 messages Feb 14, 2012 – Feb 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsprogs: 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

---

io/open.c +1 -1
index 97631e2..ac39ccc 100644
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eric Sandeen

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

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs