Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3329746imu; Sun, 11 Nov 2018 12:30:43 -0800 (PST) X-Google-Smtp-Source: AJdET5ec7EmmG7DLGHuir/uCmZn/JzRC4tsvEIeIiJsBzzUJFuJ77ydeFmX0jzN+aBCDDXttGoaF X-Received: by 2002:a62:4c6:: with SMTP id 189-v6mr13447395pfe.110.1541968243712; Sun, 11 Nov 2018 12:30:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968243; cv=none; d=google.com; s=arc-20160816; b=O08vrztOsvLcOd2UKpgDaAKWgmv0Xh1SeCJL5ob6K16BjtjD0Zj4V6IxLc8QgSqeq2 kWRynfHHdMGW2qeupdeNKSyvv/uw/9LnCojbRzOaS/HSAuTfqVPUINwE5Ab34zDCzxmI y2X8QkBYG1vbFTBuEyfbQl0N+M88TcTPNlopXwKrm4+YJ4I/mXXX5+n4D8NdrN2aZIiO b1uVp9/Gbt5oV1kVLkTjNImNkzKpgaANHIiDNgkCRXC6ez9WeUpj1hC6ZUnypHHRcvbI +Tre1NA9RWS0a5SIS/kQwpsb4FNC2jSkf6bpGzAo/ppSemRRPZ7OpfrcF2+H1p2GyE85 Sctw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=+3lSACWj9GUCKDjdUO9o1mK4RJGEZKVk1SKzMS9Xn7A=; b=HCJ3twOR+PuA7UkwsX3/oXbHFyWbFluaaj3XuvgLK1fBMfNh3Hc3WTv8luX0hNHJV6 TUWITfMkgF+rK+Oxik8QS9sW3tQs1CFmvizICpsNdgBCEoA6sAV94HiK/v36kgzjGYw1 T/wbAHngOfQZaohiYPI5uXAW2ebQ+KSs1f6XxpxzWhZSm1YRvdpFtlwNSm/lTTS/uGry YT9rvSfkQp+NKwsSQHYEna/1Zn5SHNHCKWjphq8VBMw+XbnNzkWuz1ALLdW5hkRPNr8B x9XgLHYJQtmFDg7UonXCUYmY8l4vXVnfIsj42rFWv2eO8+P/TgwZtWybQW+ULdbrnq7y cuTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si13862123pgg.463.2018.11.11.12.30.28; Sun, 11 Nov 2018 12:30:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731174AbeKLGSQ (ORCPT + 99 others); Mon, 12 Nov 2018 01:18:16 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50594 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729629AbeKLFsX (ORCPT ); Mon, 12 Nov 2018 00:48:23 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsi-0000l8-MK; Sun, 11 Nov 2018 19:58:52 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsZ-0001qP-PT; Sun, 11 Nov 2018 19:58:43 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Sage Weil" , "Jeff Layton" , "Bryan Henderson" , "Ilya Dryomov" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 327/366] ceph: fix endianness of getattr mask in ceph_d_revalidate In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Jeff Layton commit 1097680d759918ce4a8705381c0ab2ed7bd60cf1 upstream. sparse says: fs/ceph/dir.c:1248:50: warning: incorrect type in assignment (different base types) fs/ceph/dir.c:1248:50: expected restricted __le32 [usertype] mask fs/ceph/dir.c:1248:50: got int [signed] [assigned] mask Fixes: 200fd27c8fa2 ("ceph: use lookup request to revalidate dentry") Signed-off-by: Jeff Layton Reviewed-by: Sage Weil Signed-off-by: Ilya Dryomov Cc: Bryan Henderson Signed-off-by: Ben Hutchings --- fs/ceph/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1068,7 +1068,8 @@ static int ceph_d_revalidate(struct dent struct ceph_mds_client *mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; struct ceph_mds_request *req; - int op, mask, err; + int op, err; + u32 mask; op = ceph_snap(dir) == CEPH_SNAPDIR ? CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_GETATTR; @@ -1080,7 +1081,7 @@ static int ceph_d_revalidate(struct dent mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED; if (ceph_security_xattr_wanted(dir)) mask |= CEPH_CAP_XATTR_SHARED; - req->r_args.getattr.mask = mask; + req->r_args.getattr.mask = cpu_to_le32(mask); err = ceph_mdsc_do_request(mdsc, NULL, req); switch (err) {