| To: | Barry Naujok <bnaujok@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/2] simplify xfs_lock_for_rename |
| From: | Christoph Hellwig <hch@xxxxxx> |
| Date: | Fri, 11 Apr 2008 09:37:30 +0200 |
| Cc: | Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx |
| In-reply-to: | <op.t9fi87c93jf8g2@pc-bnaujok.melbourne.sgi.com> |
| References: | <20080410184413.GB6771@lst.de> <op.t9fi87c93jf8g2@pc-bnaujok.melbourne.sgi.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.3.28i |
> > It seems that do_rename() in namei.c calls lookup_hash/__lookup_hash > which does an inode->i_op->lookup() to get the dentry. This will do > the xfs_lookup anyway, taking a refernence if the target exists. > > error = do_path_lookup(newdfd, newname, LOOKUP_PARENT, &newnd); > ... > new_dentry = lookup_hash(&newnd); > ... > error = vfs_rename(old_dir->d_inode, old_dentry, > new_dir->d_inode, new_dentry); > > Therefore, target_ip/ipp2 is already known then when xfs_rename/ > xfs_lock_for_rename is called. You're right. Back to the drawing board to make rename even simpler. None of the other patches I sent yesterday depends on this one so they can go in independently. And I'd especially like to see the lookup one before lookup gets more complicated again for CI support. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [REVIEW] Remove unused HAVE_SPLICE macro, Donald Douwsma |
|---|---|
| Next by Date: | Re: odd code in xfs_remove, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 2/2] simplify xfs_lock_for_rename, Barry Naujok |
| Next by Thread: | Re: [PATCH 2/2] simplify xfs_lock_for_rename, Barry Naujok |
| Indexes: | [Date] [Thread] [Top] [All Lists] |