Message ID | 20181024195837.35532-4-olga.kornievskaia@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-cifs-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F320D13A9 for <patchwork-cifs-client@patchwork.kernel.org>; Wed, 24 Oct 2018 19:58:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E34E82AFD5 for <patchwork-cifs-client@patchwork.kernel.org>; Wed, 24 Oct 2018 19:58:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7A982AFE6; Wed, 24 Oct 2018 19:58:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F12C2AFD5 for <patchwork-cifs-client@patchwork.kernel.org>; Wed, 24 Oct 2018 19:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727369AbeJYE2M (ORCPT <rfc822;patchwork-cifs-client@patchwork.kernel.org>); Thu, 25 Oct 2018 00:28:12 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44736 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbeJYE2L (ORCPT <rfc822;linux-cifs@vger.kernel.org>); Thu, 25 Oct 2018 00:28:11 -0400 Received: by mail-qt1-f195.google.com with SMTP id o17-v6so1409283qtq.11; Wed, 24 Oct 2018 12:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D3Oki5BmKEd8nnsyx5CzmdHvMrAIdEpQvYy6/1wa7ko=; b=jb0CWUnpA+Q1EPxxDQdk98QHV1OqqAEJQScocoKZMks9O2+VTMGD56MZS3Hv78yGqm ZheLtgj6XnlcjevVWnxydz+nBY8GSOMQw5zcQDseBBJ3Vc9JURMty2KlfIko8XEREVkZ zHzCxzDxvHW9UHkamJenSAEoc2X/2hBBp+BHXJCfkLJt5ka4gK7C/p1eeHcDOGGeRiSV POfU0BKMhbSeVk4BJYPs5r8bHPGyTcNSihG5GNaMibhzT2OsccpjcvDvnXhASekV73Fm x16buNRIWLNjL8jViPycQXsxF1crLDlGeMdeF56VxxtcszyB112LCRe+Mk/ayvww0d4y x4iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D3Oki5BmKEd8nnsyx5CzmdHvMrAIdEpQvYy6/1wa7ko=; b=HuadWFsYurlChmGyJICT9EJC5NqFkFQ4tTfzuO3pkI2Nc5LrSyAIir0ZtEWd20iYH9 GIKRn5fYmT38skNXhgRGU2Lu0Qlc7Bkxao1AdnAkVTVFhw5BJvwScXJNZdIhFkOxXoHz i+I7EFAQ2FTtti7oGzNzczsK7mTDOkgJGrOdf2kbv9fFC2rUAnPRKcU2qMsvvCOM4op+ rMhjHIKM2IEdbIRrQavYrtNCc6xllcC4F39L3+KWbILoebKXaQVwDRxYXW146Mkauob/ KgX+zAYQkuQ+8fd+pQzgUWDiKlBzN49HA/OzUfxeRTXXG9jOuUN1M6Djj7NFL1P4x3tH s8AA== X-Gm-Message-State: AGRZ1gJ6gpAT2bVgLpS9XyP95HVeCf5AZz7AnR+DhWGRLS0ij2RMAeYb jhCSJcZhRP2I6quRHTuVgeU= X-Google-Smtp-Source: AJdET5eAH7+PcHTv/btAPvMM9L283QOjCm3exyEBenGY7N7+Lv6PP6xR6lN4ZArSM7wKPIVXbla5vw== X-Received: by 2002:aed:33a7:: with SMTP id v36-v6mr3326728qtd.267.1540411124255; Wed, 24 Oct 2018 12:58:44 -0700 (PDT) Received: from Olgas-MBP-195.attlocal.net (172-10-226-31.lightspeed.livnmi.sbcglobal.net. [172.10.226.31]) by smtp.gmail.com with ESMTPSA id d124-v6sm3872380qkf.85.2018.10.24.12.58.43 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 24 Oct 2018 12:58:43 -0700 (PDT) From: Olga Kornievskaia <olga.kornievskaia@gmail.com> To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, viro@zeniv.linux.org.uk, smfrench@gmail.com, miklos@szeredi.hu Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-man@vger.kernel.org Subject: [PATCH v2 02/13] CIFS: add cross-device check for copy_file_range Date: Wed, 24 Oct 2018 15:58:26 -0400 Message-Id: <20181024195837.35532-4-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) In-Reply-To: <20181024195837.35532-1-olga.kornievskaia@gmail.com> References: <20181024195837.35532-1-olga.kornievskaia@gmail.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-cifs.vger.kernel.org> X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
client-side support for "inter" SSC copy
|
expand
|
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 7065426..1f41e74 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -1114,6 +1114,8 @@ static ssize_t cifs_copy_file_range(struct file *src_file, loff_t off, unsigned int xid = get_xid(); ssize_t rc; + if (src_file->f_inode->i_sb != dst_file->f_inode->i_sb) + return -EXDEV; rc = cifs_file_copychunk_range(xid, src_file, off, dst_file, destoff, len, flags); free_xid(xid);