Merge branch 'for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[linux-drm-fsl-dcu.git] / fs / btrfs / ioctl.c
index 2a47a3148ec80df57150e3f5aa7d321abb8d1ccd..9028737ee9b506fa734382aa6d3c434c072d65b5 100644 (file)
@@ -568,6 +568,10 @@ static noinline int create_subvol(struct inode *dir,
                goto fail;
        }
 
+       mutex_lock(&new_root->objectid_mutex);
+       new_root->highest_objectid = new_dirid;
+       mutex_unlock(&new_root->objectid_mutex);
+
        /*
         * insert the directory item
         */