We drop the mutex outside the 'if' so we must take it outside
the 'if' too - which is safer as well.
Signed-off-by: NeilBrown <neilb@suse.de>
LAFSI(ino)->type != TypeDir)
goto out;
fs = fs_from_sb(sb);
+ mutex_lock(&ino->i_mutex);
if (LAFSI(ino)->type == TypeDir) {
struct datablock *inodb;
/* maybe convert this to TypeInodeFile */
if (sb->s_type != &lafs_fs_type)
- goto out;
- mutex_lock(&ino->i_mutex);
+ goto out_unlock;
if (ino->i_size)
/* FIXME maybe I should run orphans */
goto out_unlock;