Re: [PATCH 04/14] btrfs-progs: don't leak fd in get_fs_info

2013-03-08 Thread Eric Sandeen
On 3/5/13 5:41 PM, Eric Sandeen wrote: > On 3/4/13 4:39 PM, Eric Sandeen wrote: >> If we discover that a passed-in fd is not a mountpoint, >> we determine whether it is a device, and issue another >> open() against the device's mount point if it is mounted. >> >> If we do so, ensure this 2nd fd get

Re: [PATCH 04/14] btrfs-progs: don't leak fd in get_fs_info

2013-03-05 Thread Eric Sandeen
On 3/4/13 4:39 PM, Eric Sandeen wrote: > If we discover that a passed-in fd is not a mountpoint, > we determine whether it is a device, and issue another > open() against the device's mount point if it is mounted. > > If we do so, ensure this 2nd fd gets closed before we return > so that it does n

[PATCH 04/14] btrfs-progs: don't leak fd in get_fs_info

2013-03-04 Thread Eric Sandeen
If we discover that a passed-in fd is not a mountpoint, we determine whether it is a device, and issue another open() against the device's mount point if it is mounted. If we do so, ensure this 2nd fd gets closed before we return so that it does not leak, by consolidating error returns. Signed-of