diff mbox

[3/5] nfs: allow intra-file CLONE

Message ID 20151113090937.GA7024@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig Nov. 13, 2015, 9:09 a.m. UTC
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


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 {