diff --git a/libkbfs/kbfs_ops.go b/libkbfs/kbfs_ops.go
index <HASH>..<HASH> 100644
--- a/libkbfs/kbfs_ops.go
+++ b/libkbfs/kbfs_ops.go
@@ -261,13 +261,17 @@ func (fs *KBFSOpsStandard) execReadInChannel(
 func (fs *KBFSOpsStandard) GetRootMD(dir DirId) (md *RootMetadata, err error) {
 	// don't check read permissions here -- anyone should be able to read
 	// the MD to determine whether there's a public subdir or not
+	var exists bool
 	fs.execReadInChannel(dir, func(rtype reqType) error {
 		md, err = fs.getMDInChannel(Path{TopDir: dir}, rtype)
+		// Type defaults to File, so if it was set to Dir then MD already exists
+		if err == nil && md.data.Dir.Type == Dir {
+			exists = true
+		}
 		return err
 	})
 
-	// Type defaults to File, so if it was set to Dir then MD already exists
-	if err != nil || md.data.Dir.Type == Dir {
+	if err != nil || exists {
 		return
 	}
kbfs_ops: fix data race found by 'go test -race'

Don't inspect the MD outside of the scheduler.