const: make lock_manager_operations const
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 22 Sep 2009 00:01:12 +0000 (17:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2009 14:17:25 +0000 (07:17 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/lockd/svclock.c
fs/locks.c
fs/nfsd/nfs4state.c
include/linux/fs.h
include/linux/lockd/lockd.h

index e577a78d7bacf9e07d3cb50f4bb657d30d5e9446..d1001790fa9ac77569ede0eae646b7b116f2211f 100644 (file)
@@ -705,7 +705,7 @@ static int nlmsvc_same_owner(struct file_lock *fl1, struct file_lock *fl2)
        return fl1->fl_owner == fl2->fl_owner && fl1->fl_pid == fl2->fl_pid;
 }
 
-struct lock_manager_operations nlmsvc_lock_operations = {
+const struct lock_manager_operations nlmsvc_lock_operations = {
        .fl_compare_owner = nlmsvc_same_owner,
        .fl_notify = nlmsvc_notify_blocked,
        .fl_grant = nlmsvc_grant_deferred,
index 19ee18a6829b9ae443778d63d57a8d8924131748..a8794f233bc9c38d45c47f69d03652f7f6f8d533 100644 (file)
@@ -434,7 +434,7 @@ static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
        return fl->fl_file == try->fl_file;
 }
 
-static struct lock_manager_operations lease_manager_ops = {
+static const struct lock_manager_operations lease_manager_ops = {
        .fl_break = lease_break_callback,
        .fl_release_private = lease_release_private_callback,
        .fl_mylease = lease_mylease_callback,
index 980a216a48c8da9c13ed10fe3713f9a6064e8af8..766d3d54454475b1b0f26cd799d9c22e66dd0140 100644 (file)
@@ -2163,7 +2163,7 @@ int nfsd_change_deleg_cb(struct file_lock **onlist, int arg)
                return -EAGAIN;
 }
 
-static struct lock_manager_operations nfsd_lease_mng_ops = {
+static const struct lock_manager_operations nfsd_lease_mng_ops = {
        .fl_break = nfsd_break_deleg_cb,
        .fl_release_private = nfsd_release_deleg_cb,
        .fl_copy_lock = nfsd_copy_lock_deleg_cb,
@@ -3368,7 +3368,7 @@ nfs4_transform_lock_offset(struct file_lock *lock)
 
 /* Hack!: For now, we're defining this just so we can use a pointer to it
  * as a unique cookie to identify our (NFSv4's) posix locks. */
-static struct lock_manager_operations nfsd_posix_mng_ops  = {
+static const struct lock_manager_operations nfsd_posix_mng_ops  = {
 };
 
 static inline void
index 6146dec21c35338dd5748f133fed25e992eaebcb..51803528b095fa70380dc6ef201f11704e229f75 100644 (file)
@@ -1067,7 +1067,7 @@ struct file_lock {
        unsigned long fl_break_time;    /* for nonblocking lease breaks */
 
        const struct file_lock_operations *fl_ops;      /* Callbacks for filesystems */
-       struct lock_manager_operations *fl_lmops;       /* Callbacks for lockmanagers */
+       const struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */
        union {
                struct nfs_lock_info    nfs_fl;
                struct nfs4_lock_info   nfs4_fl;
index c325b187966bfc1bd0728a510714affe5117fd40..ccf2e0dc077a2987f70d262bd8e3652c07a31602 100644 (file)
@@ -395,7 +395,7 @@ static inline int nlm_compare_locks(const struct file_lock *fl1,
             &&(fl1->fl_type  == fl2->fl_type || fl2->fl_type == F_UNLCK);
 }
 
-extern struct lock_manager_operations nlmsvc_lock_operations;
+extern const struct lock_manager_operations nlmsvc_lock_operations;
 
 #endif /* __KERNEL__ */