aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-09-21 20:01:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:25 -0400
commit7b021967c5e1463936042c8da72b550d3cabe9ac (patch)
treeefb5c26216851a93b3db3fba55858af04c8a15c5
parent6aed62853c72e29f2c97bbac7712cb398e8c9437 (diff)
const: make lock_manager_operations const
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>
-rw-r--r--fs/lockd/svclock.c2
-rw-r--r--fs/locks.c2
-rw-r--r--fs/nfsd/nfs4state.c4
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/lockd/lockd.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index e577a78d7bac..d1001790fa9a 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -705,7 +705,7 @@ static int nlmsvc_same_owner(struct file_lock *fl1, struct file_lock *fl2)
705 return fl1->fl_owner == fl2->fl_owner && fl1->fl_pid == fl2->fl_pid; 705 return fl1->fl_owner == fl2->fl_owner && fl1->fl_pid == fl2->fl_pid;
706} 706}
707 707
708struct lock_manager_operations nlmsvc_lock_operations = { 708const struct lock_manager_operations nlmsvc_lock_operations = {
709 .fl_compare_owner = nlmsvc_same_owner, 709 .fl_compare_owner = nlmsvc_same_owner,
710 .fl_notify = nlmsvc_notify_blocked, 710 .fl_notify = nlmsvc_notify_blocked,
711 .fl_grant = nlmsvc_grant_deferred, 711 .fl_grant = nlmsvc_grant_deferred,
diff --git a/fs/locks.c b/fs/locks.c
index 19ee18a6829b..a8794f233bc9 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -434,7 +434,7 @@ static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
434 return fl->fl_file == try->fl_file; 434 return fl->fl_file == try->fl_file;
435} 435}
436 436
437static struct lock_manager_operations lease_manager_ops = { 437static const struct lock_manager_operations lease_manager_ops = {
438 .fl_break = lease_break_callback, 438 .fl_break = lease_break_callback,
439 .fl_release_private = lease_release_private_callback, 439 .fl_release_private = lease_release_private_callback,
440 .fl_mylease = lease_mylease_callback, 440 .fl_mylease = lease_mylease_callback,
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 980a216a48c8..766d3d544544 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2163,7 +2163,7 @@ int nfsd_change_deleg_cb(struct file_lock **onlist, int arg)
2163 return -EAGAIN; 2163 return -EAGAIN;
2164} 2164}
2165 2165
2166static struct lock_manager_operations nfsd_lease_mng_ops = { 2166static const struct lock_manager_operations nfsd_lease_mng_ops = {
2167 .fl_break = nfsd_break_deleg_cb, 2167 .fl_break = nfsd_break_deleg_cb,
2168 .fl_release_private = nfsd_release_deleg_cb, 2168 .fl_release_private = nfsd_release_deleg_cb,
2169 .fl_copy_lock = nfsd_copy_lock_deleg_cb, 2169 .fl_copy_lock = nfsd_copy_lock_deleg_cb,
@@ -3368,7 +3368,7 @@ nfs4_transform_lock_offset(struct file_lock *lock)
3368 3368
3369/* Hack!: For now, we're defining this just so we can use a pointer to it 3369/* Hack!: For now, we're defining this just so we can use a pointer to it
3370 * as a unique cookie to identify our (NFSv4's) posix locks. */ 3370 * as a unique cookie to identify our (NFSv4's) posix locks. */
3371static struct lock_manager_operations nfsd_posix_mng_ops = { 3371static const struct lock_manager_operations nfsd_posix_mng_ops = {
3372}; 3372};
3373 3373
3374static inline void 3374static inline void
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6146dec21c35..51803528b095 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1067,7 +1067,7 @@ struct file_lock {
1067 unsigned long fl_break_time; /* for nonblocking lease breaks */ 1067 unsigned long fl_break_time; /* for nonblocking lease breaks */
1068 1068
1069 const struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ 1069 const struct file_lock_operations *fl_ops; /* Callbacks for filesystems */
1070 struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */ 1070 const struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */
1071 union { 1071 union {
1072 struct nfs_lock_info nfs_fl; 1072 struct nfs_lock_info nfs_fl;
1073 struct nfs4_lock_info nfs4_fl; 1073 struct nfs4_lock_info nfs4_fl;
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index c325b187966b..ccf2e0dc077a 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -395,7 +395,7 @@ static inline int nlm_compare_locks(const struct file_lock *fl1,
395 &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); 395 &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK);
396} 396}
397 397
398extern struct lock_manager_operations nlmsvc_lock_operations; 398extern const struct lock_manager_operations nlmsvc_lock_operations;
399 399
400#endif /* __KERNEL__ */ 400#endif /* __KERNEL__ */
401 401