From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Dobriyan Subject: [PATCH 7/9] const: make file_lock_operations const Date: Thu, 10 Sep 2009 03:20:54 +0400 Message-ID: <20090909232054.GG2881@x200.localdomain> References: <20090909231518.GA2881@x200.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk Return-path: Received: from mail-ew0-f206.google.com ([209.85.219.206]:34120 "EHLO mail-ew0-f206.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754507AbZIIXUy (ORCPT ); Wed, 9 Sep 2009 19:20:54 -0400 Received: by mail-ew0-f206.google.com with SMTP id 2so4194600ewy.17 for ; Wed, 09 Sep 2009 16:20:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20090909231518.GA2881@x200.localdomain> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Alexey Dobriyan --- fs/afs/flock.c | 2 +- fs/lockd/clntproc.c | 2 +- fs/nfs/nfs4state.c | 2 +- include/linux/fs.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) --- a/fs/afs/flock.c +++ b/fs/afs/flock.c @@ -21,7 +21,7 @@ static void afs_fl_release_private(struct file_lock *fl); static struct workqueue_struct *afs_lock_manager; static DEFINE_MUTEX(afs_lock_manager_mutex); -static struct file_lock_operations afs_lock_ops = { +static const struct file_lock_operations afs_lock_ops = { .fl_copy_lock = afs_fl_copy_lock, .fl_release_private = afs_fl_release_private, }; --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -458,7 +458,7 @@ static void nlmclnt_locks_release_private(struct file_lock *fl) nlm_put_lockowner(fl->fl_u.nfs_fl.owner); } -static struct file_lock_operations nlmclnt_lock_ops = { +static const struct file_lock_operations nlmclnt_lock_ops = { .fl_copy_lock = nlmclnt_locks_copy_lock, .fl_release_private = nlmclnt_locks_release_private, }; --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -638,7 +638,7 @@ static void nfs4_fl_release_lock(struct file_lock *fl) nfs4_put_lock_state(fl->fl_u.nfs4_fl.owner); } -static struct file_lock_operations nfs4_fl_lock_ops = { +static const struct file_lock_operations nfs4_fl_lock_ops = { .fl_copy_lock = nfs4_fl_copy_lock, .fl_release_private = nfs4_fl_release_lock, }; --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1067,7 +1067,7 @@ struct file_lock { struct fasync_struct * fl_fasync; /* for lease break notifications */ unsigned long fl_break_time; /* for nonblocking lease breaks */ - struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ + const struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */ union { struct nfs_lock_info nfs_fl;