Loading fs/ocfs2/dcache.c +5 −11 Original line number Original line Diff line number Diff line Loading @@ -170,13 +170,10 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, u64 parent_blkno, int skip_unhashed) int skip_unhashed) { { struct list_head *p; struct dentry *dentry; struct dentry *dentry = NULL; spin_lock(&inode->i_lock); spin_lock(&inode->i_lock); list_for_each(p, &inode->i_dentry) { list_for_each_entry(dentry, &inode->i_dentry, d_alias) { dentry = list_entry(p, struct dentry, d_alias); spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock); if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { trace_ocfs2_find_local_alias(dentry->d_name.len, trace_ocfs2_find_local_alias(dentry->d_name.len, Loading @@ -184,16 +181,13 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, dget_dlock(dentry); dget_dlock(dentry); spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock); break; spin_unlock(&inode->i_lock); return dentry; } } spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock); dentry = NULL; } } spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock); return NULL; return dentry; } } DEFINE_SPINLOCK(dentry_attach_lock); DEFINE_SPINLOCK(dentry_attach_lock); Loading Loading
fs/ocfs2/dcache.c +5 −11 Original line number Original line Diff line number Diff line Loading @@ -170,13 +170,10 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, u64 parent_blkno, int skip_unhashed) int skip_unhashed) { { struct list_head *p; struct dentry *dentry; struct dentry *dentry = NULL; spin_lock(&inode->i_lock); spin_lock(&inode->i_lock); list_for_each(p, &inode->i_dentry) { list_for_each_entry(dentry, &inode->i_dentry, d_alias) { dentry = list_entry(p, struct dentry, d_alias); spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock); if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { trace_ocfs2_find_local_alias(dentry->d_name.len, trace_ocfs2_find_local_alias(dentry->d_name.len, Loading @@ -184,16 +181,13 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, dget_dlock(dentry); dget_dlock(dentry); spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock); break; spin_unlock(&inode->i_lock); return dentry; } } spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock); dentry = NULL; } } spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock); return NULL; return dentry; } } DEFINE_SPINLOCK(dentry_attach_lock); DEFINE_SPINLOCK(dentry_attach_lock); Loading