Message ID | 88362f08a12bcf5c094b57cca9424ef5438e3605.1440598568.git.zhaolei@cn.fujitsu.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Wed, Aug 26, 2015 at 10:16:14PM +0800, Zhao Lei wrote: > We don't need to use value of mntid in cmd_subvol_show(), no need > to get its value. > > Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Right, the subvolume id is obtained by other means. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 20e2c01..75ecd45 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -939,7 +939,7 @@ static int cmd_subvol_show(int argc, char **argv) char uuidparse[BTRFS_UUID_UNPARSED_SIZE]; char *fullpath = NULL, *svpath = NULL, *mnt = NULL; char raw_prefix[] = "\t\t\t\t"; - u64 sv_id, mntid; + u64 sv_id; int fd = -1, mntfd = -1; int ret = 1; DIR *dirstream1 = NULL, *dirstream2 = NULL; @@ -999,12 +999,6 @@ static int cmd_subvol_show(int argc, char **argv) goto out; } - ret = btrfs_list_get_path_rootid(mntfd, &mntid); - if (ret) { - fprintf(stderr, "ERROR: can't get rootid for '%s'\n", mnt); - goto out; - } - if (sv_id == BTRFS_FS_TREE_OBJECTID) { printf("%s is btrfs root\n", fullpath); goto out;
We don't need to use value of mntid in cmd_subvol_show(), no need to get its value. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> --- cmds-subvolume.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)