The first patch is a trival close of fd on function returns, somehow missed that last go-round.
The next 3 are a little more substantial, working to avoid the nasty behavior of get_fs_info, closing & re-opening the callers' filehandle out of scope, if it needs to switch from device node to mountpoint. (I suppose we could pass in *fd by reference, but this behavior just seems like a wrong, magical side effect for get_fs_info). So instead, the callers use a helper to *always* wind up with the mountpoint opened, and get_fs_info() now *only* - well - only gets fs info. The previous behavior of "if given a device act only on that device; if given a mountpoint act on all devices" should persist; I guess that's the original intent. It's really only lightly tested; it should mostly affect: * btrfs device stats * btrfs replace start * btrfs scrub start * btrfs scrub status so any independent sanity testing of that would be great. It'l be nice if/when we get xfstests coverage of some of this to make it easier. :) Thanks, -Eric -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html