From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0854C4727D for ; Sat, 3 Oct 2020 02:55:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E9DD20719 for ; Sat, 3 Oct 2020 02:55:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TkCCLKAt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725875AbgJCCzm (ORCPT ); Fri, 2 Oct 2020 22:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgJCCzl (ORCPT ); Fri, 2 Oct 2020 22:55:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D561C0613E5 for ; Fri, 2 Oct 2020 19:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=azF4s+OwgCljpUHBjnvPyPfLu7xTfdBTh2YRJ7BzcO8=; b=TkCCLKAtcDrXa3atKimDvn8yim 0hQ5PKTMerbJDSKrIJwddJrWlvZFpffEG/hN1PiwGIcJKgrvrxkytLipTOHQEFVbJubZrwT5pxmBN ibN4vuRAgbzlfNjg43MDBHcnH4x8fGURXUJpagAZrItWArBucSW+yESv+Th+9HZAtGyRvqwlsp8o1 xF2fMvl9xWMyEBVPsX4sAoeQn7rjxu6gQ8z/xJ/N2bmjDIVt53uFQVkQqIH+fzlbvhjbHSN27wcTS aSQBs90QGc5ODFZxOGpbzRGofCnQYCHrhvw+3CJF/mBvGcHZ3sdlfjAXHXqMTdZs/jIldIkk6095i 9xTOg1NQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOXhz-0005W4-1G; Sat, 03 Oct 2020 02:55:39 +0000 From: "Matthew Wilcox (Oracle)" To: Al Viro Cc: "Matthew Wilcox (Oracle)" , Christoph Hellwig , linux-fsdevel@vger.kernel.org Subject: [PATCH 13/13] usermode: Pass a NULL pointer to kernel_write Date: Sat, 3 Oct 2020 03:55:34 +0100 Message-Id: <20201003025534.21045-14-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20201003025534.21045-1-willy@infradead.org> References: <20201003025534.21045-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org We want to start at 0 and do not care about the updated value. Signed-off-by: Matthew Wilcox (Oracle) --- kernel/usermode_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/usermode_driver.c b/kernel/usermode_driver.c index 0b35212ffc3d..ff880befc5bf 100644 --- a/kernel/usermode_driver.c +++ b/kernel/usermode_driver.c @@ -15,7 +15,6 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na struct vfsmount *mnt; struct file *file; ssize_t written; - loff_t pos = 0; type = get_fs_type("tmpfs"); if (!type) @@ -32,7 +31,7 @@ static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *na return ERR_CAST(file); } - written = kernel_write(file, data, len, &pos); + written = kernel_write(file, data, len, NULL); if (written != len) { int err = written; if (err >= 0) -- 2.28.0