Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdHaJ74 (ORCPT ); Thu, 31 Aug 2017 05:59:56 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38554 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbdHaJ7z (ORCPT ); Thu, 31 Aug 2017 05:59:55 -0400 X-Google-Smtp-Source: ADKCNb5CtEunCvqKLflZBM8ZuGFjSFEVZ/NV/QU33AQiUgoxB+hB/UguRTKuR1bn1WktNdVumQwsDQ== From: Arvind Yadav To: lucho@ionkov.net, rminnich@sandia.gov, ericvh@gmail.com Cc: linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net Subject: [PATCH] 9p: constify xattr_handler Date: Thu, 31 Aug 2017 15:28:43 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1333 Lines: 40 xattr_handler are not supposed to change at runtime. "struct super_block" working with xattr_handler provided by work with const xattr_handler. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- fs/9p/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index f329eee..3d45d25 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c @@ -154,20 +154,20 @@ static int v9fs_xattr_handler_set(const struct xattr_handler *handler, return v9fs_xattr_set(dentry, full_name, value, size, flags); } -static struct xattr_handler v9fs_xattr_user_handler = { +static const struct xattr_handler v9fs_xattr_user_handler = { .prefix = XATTR_USER_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; -static struct xattr_handler v9fs_xattr_trusted_handler = { +static const struct xattr_handler v9fs_xattr_trusted_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, }; #ifdef CONFIG_9P_FS_SECURITY -static struct xattr_handler v9fs_xattr_security_handler = { +static const struct xattr_handler v9fs_xattr_security_handler = { .prefix = XATTR_SECURITY_PREFIX, .get = v9fs_xattr_handler_get, .set = v9fs_xattr_handler_set, -- 1.9.1