lock odf inode when calling the odf fs's get_parent
authorYiannis Pericleous <yiannos@loki.fsl.cs.sunysb.edu>
Wed, 30 May 2007 01:47:53 +0000 (21:47 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:02:44 +0000 (19:02 -0400)
fs/unionfs/export.c

index 1c27ba6e070d081571d34bd760fe2a1b192274c4..403240ea7d234914aed81aa24007f029d7244800 100644 (file)
@@ -137,7 +137,9 @@ static struct dentry *unionfs_get_parent(struct dentry *child)
                goto out;
        }
 
+       mutex_lock(&odf_child->d_inode->i_mutex);
        odf_parent = odf_sb->s_export_op->get_parent(odf_child);
+       mutex_unlock(&odf_child->d_inode->i_mutex);
        if (IS_ERR(odf_parent)) {
                dput(odf_child);
                res = odf_parent;