Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453521

Re: [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is needed

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is needed
Date 2016-08-02 02:40 +0200
Message-ID <s1vUt-5l3-7@gated-at.bofh.it> (permalink)
References <s1t6h-3wY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 01, 2016 at 09:57:17PM +0200, Johannes Berg wrote:
> The introduction of v9fs_parent_fid() broke v9fs_vfs_rename()
> since that doesn't just do v9fs_fid_lookup() but rather uses
> v9fs_fid_clone() on the ->d_parent.
> 
> I suppose it'd be possible to introduce v9fs_clone_parent_fid()
> but I decided that just reverting the broken change was better
> for now.

Sorry for the braino; FWIW, I'd rather add

static inline struct p9_fid *fid_clone(struct p9_fid *fid)
{
	if (IS_ERR(fid))
		return fid;
	return p9_client_walk(fid, 0, NULL, 1);
}

and turn those into fid_clone(v9fs_parent_fid(old_dentry)), etc.  Has an
extra benefit of simplifying several other places.  I'll fix and post
(with credits to you for spotting the bug in question, of course).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is needed Johannes Berg <johannes@sipsolutions.net> - 2016-08-01 23:40 +0200
  Re: [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is  needed Al Viro <viro@ZenIV.linux.org.uk> - 2016-08-02 02:40 +0200
    Re: [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone()  is needed Johannes Berg <johannes@sipsolutions.net> - 2016-08-02 09:10 +0200

csiph-web