From: Al Viro Date: Sat, 9 Jun 2012 17:19:12 +0000 (-0400) Subject: ext4: get rid of open-coded d_find_any_alias() X-Git-Tag: v3.6-rc1~18^2~163 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f713878f22e0b2d34d62df0ca55f65166375634;p=platform%2Fkernel%2Flinux-3.10.git ext4: get rid of open-coded d_find_any_alias() Signed-off-by: Al Viro --- diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index bb6c7d8..4359a4d 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -135,14 +135,7 @@ static int ext4_sync_parent(struct inode *inode) inode = igrab(inode); while (ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) { ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY); - dentry = NULL; - spin_lock(&inode->i_lock); - if (!list_empty(&inode->i_dentry)) { - dentry = list_first_entry(&inode->i_dentry, - struct dentry, d_alias); - dget(dentry); - } - spin_unlock(&inode->i_lock); + dentry = d_find_any_alias(inode); if (!dentry) break; next = igrab(dentry->d_parent->d_inode);