From patchwork Tue Jun 9 16:13:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E36913B1 for ; Tue, 9 Jun 2020 16:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2500F20801 for ; Tue, 9 Jun 2020 16:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Y6AEg51S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731125AbgFIQNV (ORCPT ); Tue, 9 Jun 2020 12:13:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48758 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731112AbgFIQNU (ORCPT ); Tue, 9 Jun 2020 12:13:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yeGZmO/JYZG5FQp5dwk/kPkEYWtQgdOsYGZyA4HB6Bo=; b=Y6AEg51SxI7g8MPXro2GxLwL/cWDC2kNLPlvvq58xv+ZHHwbcKmXSj9iGBtDPqjb9yngQ9 tcOHqDhDK9tQm+dYrBeGcCvNbJHbFmulsgFw1gYwvLQwNWL6T3tg0xhBywUaajqCC0RcIU TTZ4XjiWTjPUg8asSpZMLFoVCMvhWiw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-wP6gp0uBPvuudx7tztxueg-1; Tue, 09 Jun 2020 12:13:15 -0400 X-MC-Unique: wP6gp0uBPvuudx7tztxueg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C3DA9117F; Tue, 9 Jun 2020 16:13:14 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DCA07A1EB; Tue, 9 Jun 2020 16:13:13 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 1/6] afs: Fix memory leak in afs_put_sysnames() From: David Howells To: linux-afs@lists.infradead.org Cc: Zhihao Cheng , dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:12 +0100 Message-ID: <159171919260.3038039.5675242420072463110.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: Zhihao Cheng Fix afs_put_sysnames() to actually free the specified afs_sysnames object after its reference count has been decreased to zero and its contents have been released. Fixes: 6f8880d8e681557 ("afs: Implement @sys substitution handling") Signed-off-by: Zhihao Cheng Signed-off-by: David Howells --- fs/afs/proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 22d00cf1913d..e817fc740ba0 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -567,6 +567,7 @@ void afs_put_sysnames(struct afs_sysnames *sysnames) if (sysnames->subs[i] != afs_init_sysname && sysnames->subs[i] != sysnames->blank) kfree(sysnames->subs[i]); + kfree(sysnames); } } From patchwork Tue Jun 9 16:13:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8760F13B1 for ; Tue, 9 Jun 2020 16:13:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A5AD20774 for ; Tue, 9 Jun 2020 16:13:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FvgzkLP7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731151AbgFIQN1 (ORCPT ); Tue, 9 Jun 2020 12:13:27 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54826 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731134AbgFIQN0 (ORCPT ); Tue, 9 Jun 2020 12:13:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SPVVcRFgzz+szQgQMLyZwoek+uHNhgwrukerrAxYQdk=; b=FvgzkLP70VfkrPzCjOlMB50w1PsRiWFL2oHV1eHRIe1kSKMPBybW9xEULxtrq77zYWakSi +mFNabrw/B0alexi2J4Fw1UNJpIHc8Fl0bjvqSeX/5k3m8KTqjPUX/kjyjZvSnLga8vJ0V AjNoIAxjsTQrbsOFzeHvYQr5cgg5ZPg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-256-rbQADSm2NGKGPzs9WeSxVw-1; Tue, 09 Jun 2020 12:13:22 -0400 X-MC-Unique: rbQADSm2NGKGPzs9WeSxVw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66911835B40; Tue, 9 Jun 2020 16:13:21 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 748BA6298C; Tue, 9 Jun 2020 16:13:20 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 2/6] afs: Fix file locking From: David Howells To: linux-afs@lists.infradead.org Cc: Dave Botsch , Dave Botsch , dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:19 +0100 Message-ID: <159171919967.3038039.17802563446058952615.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Fix AFS file locking to use the correct vnode pointer and remove a member of the afs_operation struct that is never set, but it is read and followed, causing an oops. This can be triggered by: flock -s /afs/example.com/foo sleep 1 when it calls the kernel to get a file lock. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch Signed-off-by: David Howells Tested-by: Dave Botsch --- fs/afs/flock.c | 2 +- fs/afs/internal.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/afs/flock.c b/fs/afs/flock.c index 70e518f7bc19..71eea2a908c7 100644 --- a/fs/afs/flock.c +++ b/fs/afs/flock.c @@ -71,7 +71,7 @@ static void afs_schedule_lock_extension(struct afs_vnode *vnode) void afs_lock_op_done(struct afs_call *call) { struct afs_operation *op = call->op; - struct afs_vnode *vnode = op->lock.lvnode; + struct afs_vnode *vnode = op->file[0].vnode; if (call->error == 0) { spin_lock(&vnode->lock); diff --git a/fs/afs/internal.h b/fs/afs/internal.h index e1621b0670cc..519ffb104616 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -795,7 +795,6 @@ struct afs_operation { struct afs_read *req; } fetch; struct { - struct afs_vnode *lvnode; /* vnode being locked */ afs_lock_type_t type; } lock; struct { From patchwork Tue Jun 9 16:13:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3FF313B1 for ; Tue, 9 Jun 2020 16:13:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94D8C20774 for ; Tue, 9 Jun 2020 16:13:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AuCsk62R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731170AbgFIQNd (ORCPT ); Tue, 9 Jun 2020 12:13:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42326 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731093AbgFIQNc (ORCPT ); Tue, 9 Jun 2020 12:13:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JUGhyhAM3xv/+2IOQidLA1A/yKCzpzQ3bL3njFAMOIs=; b=AuCsk62RuvQXn+b/oFfkWd69/W1qb041PlHeWy0vBT4yWK1YgfrfPzyVhjNrt4TxOTZcgs CRmUwIKqeXCPk2icuUIex6thgl/mjAibdCqBPMnb2FnmdVevbaCNqlse2F2flY+cGTqOO9 5D2KyS3uqA9hUlTUWWPHYgUSdlzJP1c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-eumuOTcrNTyyjj6fSpoEKg-1; Tue, 09 Jun 2020 12:13:29 -0400 X-MC-Unique: eumuOTcrNTyyjj6fSpoEKg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E3FB8014D4; Tue, 9 Jun 2020 16:13:28 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BD81768DA; Tue, 9 Jun 2020 16:13:27 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 3/6] afs: Fix use of BUG() From: David Howells To: linux-afs@lists.infradead.org Cc: Kees Cook , dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:26 +0100 Message-ID: <159171920664.3038039.18059422273265286162.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Fix afs_compare_addrs() to use WARN_ON(1) instead of BUG() and return 1 (ie. srx_a > srx_b). There's no point trying to put actual error handling in as this should not occur unless a new transport address type is allowed by AFS. And even if it does, in this particular case, it'll just never match unknown types of addresses. This BUG() was more of a 'you need to add a case here' indicator. Reported-by: Kees Cook Signed-off-by: David Howells Reviewed-by: Kees Cook --- fs/afs/vl_alias.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/afs/vl_alias.c b/fs/afs/vl_alias.c index 093895c49c21..136fc6164e00 100644 --- a/fs/afs/vl_alias.c +++ b/fs/afs/vl_alias.c @@ -73,7 +73,8 @@ static int afs_compare_addrs(const struct sockaddr_rxrpc *srx_a, } default: - BUG(); + WARN_ON(1); + diff = 1; } out: From patchwork Tue Jun 9 16:13:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595985 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D506E13B1 for ; Tue, 9 Jun 2020 16:13:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9BE720801 for ; Tue, 9 Jun 2020 16:13:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PEuRLxIF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731201AbgFIQNo (ORCPT ); Tue, 9 Jun 2020 12:13:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42869 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731163AbgFIQNl (ORCPT ); Tue, 9 Jun 2020 12:13:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U5NH97ZcwEvgcbggB5cCoStGuDG8xCBT7rh0SCpAdEE=; b=PEuRLxIFrajIE7iMdDL/V/Y9C8KsXfHa8JgG2LKv+ZaPAvFQS3+yDvd3uCBExsK7m3/gVr jGdqBk2Ia/ZOOOoec/QCwsSptFiq5piepNpz5mcra26zXDRPZrx0KGS5PaUK9tSblfSwgY fg8PGWjDDAy8T9tYGcVngX7KkDa7/K0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-wdOCNE_SOFmOVkJqu5AyHg-1; Tue, 09 Jun 2020 12:13:36 -0400 X-MC-Unique: wdOCNE_SOFmOVkJqu5AyHg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D3388014D4; Tue, 9 Jun 2020 16:13:35 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5982360C87; Tue, 9 Jun 2020 16:13:34 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 4/6] afs: Fix debugging statements with %px to be %p From: David Howells To: linux-afs@lists.infradead.org Cc: Kees Cook , dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:33 +0100 Message-ID: <159171921360.3038039.10494245358653942664.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Fix a couple of %px to be %x in debugging statements. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Fixes: 8a070a964877 ("afs: Detect cell aliases 1 - Cells with root volumes") Reported-by: Kees Cook Signed-off-by: David Howells Reviewed-by: Kees Cook --- fs/afs/dir.c | 2 +- fs/afs/vl_alias.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 25cbe0aeeec5..aa1d34141ea3 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -980,7 +980,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, if (!IS_ERR_OR_NULL(inode)) fid = AFS_FS_I(inode)->fid; - _debug("splice %px", dentry->d_inode); + _debug("splice %p", dentry->d_inode); d = d_splice_alias(inode, dentry); if (!IS_ERR_OR_NULL(d)) { d->d_fsdata = dentry->d_fsdata; diff --git a/fs/afs/vl_alias.c b/fs/afs/vl_alias.c index 136fc6164e00..5082ef04e99c 100644 --- a/fs/afs/vl_alias.c +++ b/fs/afs/vl_alias.c @@ -28,7 +28,7 @@ static struct afs_volume *afs_sample_volume(struct afs_cell *cell, struct key *k }; volume = afs_create_volume(&fc); - _leave(" = %px", volume); + _leave(" = %p", volume); return volume; } From patchwork Tue Jun 9 16:13:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595987 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AAF160D for ; Tue, 9 Jun 2020 16:13:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 319F52078D for ; Tue, 9 Jun 2020 16:13:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QZ9h97J5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731211AbgFIQNv (ORCPT ); Tue, 9 Jun 2020 12:13:51 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47911 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731204AbgFIQNp (ORCPT ); Tue, 9 Jun 2020 12:13:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=02HV0hM+jmbbf5rG+ZCbj7NGvXL6ZgpcGKGqVPTuOyw=; b=QZ9h97J5NXltK1bQddEIu0i+DZi2CBqtSVmxks8jG2zn61WjBoeDJnx+gqQf9FqJGz1KID o8IDy4JUyhfQIMak3fpyDEd1p4WngYuBT8i16fUc5mLPzPQy6JT0xSCYw4VNWlAi+3vzVA FQpUuhJGLrqlMQQhLmTBHxqGFAAeQM8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-20-mnQqfp6RODWz1HP_KNm4Zg-1; Tue, 09 Jun 2020 12:13:43 -0400 X-MC-Unique: mnQqfp6RODWz1HP_KNm4Zg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 078E5107ACCA; Tue, 9 Jun 2020 16:13:42 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C4B35D9E4; Tue, 9 Jun 2020 16:13:41 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 5/6] afs: Remove afs_zero_fid as it's not used From: David Howells To: linux-afs@lists.infradead.org Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:40 +0100 Message-ID: <159171922045.3038039.11643205985887320787.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Remove afs_zero_fid as it's not used. Signed-off-by: David Howells --- fs/afs/yfsclient.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c index b0a6e40b4da3..52d5af5fcd44 100644 --- a/fs/afs/yfsclient.c +++ b/fs/afs/yfsclient.c @@ -15,8 +15,6 @@ #include "xdr_fs.h" #include "protocol_yfs.h" -static const struct afs_fid afs_zero_fid; - #define xdr_size(x) (sizeof(*x) / sizeof(__be32)) static void xdr_decode_YFSFid(const __be32 **_bp, struct afs_fid *fid) From patchwork Tue Jun 9 16:13:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 11595989 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2982713B1 for ; Tue, 9 Jun 2020 16:14:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BCEF2078C for ; Tue, 9 Jun 2020 16:14:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PfQZFkGi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731229AbgFIQN7 (ORCPT ); Tue, 9 Jun 2020 12:13:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39045 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731225AbgFIQNx (ORCPT ); Tue, 9 Jun 2020 12:13:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591719232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+NfdDHd048erz6t6tm56S9vVVu/IFfv0ONqlf8UAtGg=; b=PfQZFkGiW2tZC5sP4z0/tICrRx3zmvtOZ5EZ3/WX/CM7PCBYNvxzL/Sxk4exeGax5TlCq7 5WKNwc6hVyP2BktD3t8mPRK56dAoCx69gWEKFqITb/NOr3/p8UDOl71DdkQTcVG4GAubIh xJUSdv//qVtzyAZBJknro6gUda2B1vU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-5lTf6LqqNgSq2fj980Vfrw-1; Tue, 09 Jun 2020 12:13:49 -0400 X-MC-Unique: 5lTf6LqqNgSq2fj980Vfrw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E159C107ACF2; Tue, 9 Jun 2020 16:13:48 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-114-66.rdu2.redhat.com [10.10.114.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13DA01001281; Tue, 9 Jun 2020 16:13:47 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 6/6] afs: Make afs_zap_data() static From: David Howells To: linux-afs@lists.infradead.org Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 09 Jun 2020 17:13:47 +0100 Message-ID: <159171922724.3038039.13172044294369425099.stgit@warthog.procyon.org.uk> In-Reply-To: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> References: <159171918506.3038039.10915051218779105094.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.22 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Make afs_zap_data() static as it's only used in the file in which it is defined. Signed-off-by: David Howells --- fs/afs/inode.c | 2 +- fs/afs/internal.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 7dde703df40c..cd0a0060950b 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -538,7 +538,7 @@ struct inode *afs_root_iget(struct super_block *sb, struct key *key) * mark the data attached to an inode as obsolete due to a write on the server * - might also want to ditch all the outstanding writes and dirty pages */ -void afs_zap_data(struct afs_vnode *vnode) +static void afs_zap_data(struct afs_vnode *vnode) { _enter("{%llx:%llu}", vnode->fid.vid, vnode->fid.vnode); diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 519ffb104616..0c9806ef2a19 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -1069,7 +1069,6 @@ extern int afs_ilookup5_test_by_fid(struct inode *, void *); extern struct inode *afs_iget_pseudo_dir(struct super_block *, bool); extern struct inode *afs_iget(struct afs_operation *, struct afs_vnode_param *); extern struct inode *afs_root_iget(struct super_block *, struct key *); -extern void afs_zap_data(struct afs_vnode *); extern bool afs_check_validity(struct afs_vnode *); extern int afs_validate(struct afs_vnode *, struct key *); extern int afs_getattr(const struct path *, struct kstat *, u32, unsigned int);