From 33ac47b5fb0b7202ac32b6ab018a5212b790c4f1 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 13 Jan 2016 18:08:34 +0100 Subject: [PATCH] btrfs-progs: use symbolic name for subvolume inode number in test_issubvolume Signed-off-by: David Sterba --- cmds-subvolume.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 6ff41e2..d4ef102 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -238,7 +238,8 @@ int test_issubvolume(char *path) if(res < 0 ) return -1; - return (st.st_ino == 256) && S_ISDIR(st.st_mode); + return (st.st_ino == BTRFS_FIRST_FREE_OBJECTID) + && S_ISDIR(st.st_mode); } static int wait_for_commit(int fd) -- 2.7.4