All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Peng Tao <tao.peng@primarydata.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/5] nfs: allow intra-file CLONE
Date: Fri, 13 Nov 2015 10:09:37 +0100	[thread overview]
Message-ID: <20151113090937.GA7024@lst.de> (raw)
In-Reply-To: <1447403929-13743-4-git-send-email-hch@lst.de>

Meh, a fixlet got lost while rebasing.  See below for the one liner
or just grab the git tree from:

	http://git.infradead.org/users/hch/pnfs.git/shortlog/refs/heads/clone-fixes
	git://git.infradead.org/users/hch/pnfs.git clone-fixes

diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 49dbeab..db9b5fe 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -258,7 +258,7 @@ nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
 	/* XXX: do we lock at all? what if server needs CB_RECALL_LAYOUT? */
 	if (same_inode) {
 		mutex_lock(&src_inode->i_mutex);
-	} if (dst_inode < src_inode) {
+	} else if (dst_inode < src_inode) {
 		mutex_lock_nested(&dst_inode->i_mutex, I_MUTEX_PARENT);
 		mutex_lock_nested(&src_inode->i_mutex, I_MUTEX_CHILD);
 	} else {


  reply	other threads:[~2015-11-13  9:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  8:38 CLONE fixes, V2 Christoph Hellwig
2015-11-13  8:38 ` [PATCH 1/5] nfs: pass on count for CLONE operations Christoph Hellwig
2015-11-13  8:38 ` [PATCH 2/5] nfs: offer native ioctls even if CONFIG_COMPAT is set Christoph Hellwig
2015-11-13  8:38 ` [PATCH 3/5] nfs: allow intra-file CLONE Christoph Hellwig
2015-11-13  9:09   ` Christoph Hellwig [this message]
2015-11-13  8:38 ` [PATCH 4/5] nfs: use btrfs ioctl defintions for clone Christoph Hellwig
2015-11-13  8:38 ` [PATCH 5/5] nfs: reduce the amount of ifdefs for v4.2 in nfs4file.c Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151113090937.GA7024@lst.de \
    --to=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tao.peng@primarydata.com \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.