Commit 7b021967c5e1463936042c8da72b550d3cabe9ac
Committed by
Linus Torvalds
1 parent
6aed62853c
Exists in
master
and in
7 other branches
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>
Showing 5 changed files with 6 additions and 6 deletions Side-by-side Diff
fs/lockd/svclock.c
... | ... | @@ -705,7 +705,7 @@ |
705 | 705 | return fl1->fl_owner == fl2->fl_owner && fl1->fl_pid == fl2->fl_pid; |
706 | 706 | } |
707 | 707 | |
708 | -struct lock_manager_operations nlmsvc_lock_operations = { | |
708 | +const struct lock_manager_operations nlmsvc_lock_operations = { | |
709 | 709 | .fl_compare_owner = nlmsvc_same_owner, |
710 | 710 | .fl_notify = nlmsvc_notify_blocked, |
711 | 711 | .fl_grant = nlmsvc_grant_deferred, |
fs/locks.c
... | ... | @@ -434,7 +434,7 @@ |
434 | 434 | return fl->fl_file == try->fl_file; |
435 | 435 | } |
436 | 436 | |
437 | -static struct lock_manager_operations lease_manager_ops = { | |
437 | +static const struct lock_manager_operations lease_manager_ops = { | |
438 | 438 | .fl_break = lease_break_callback, |
439 | 439 | .fl_release_private = lease_release_private_callback, |
440 | 440 | .fl_mylease = lease_mylease_callback, |
fs/nfsd/nfs4state.c
... | ... | @@ -2163,7 +2163,7 @@ |
2163 | 2163 | return -EAGAIN; |
2164 | 2164 | } |
2165 | 2165 | |
2166 | -static struct lock_manager_operations nfsd_lease_mng_ops = { | |
2166 | +static const struct lock_manager_operations nfsd_lease_mng_ops = { | |
2167 | 2167 | .fl_break = nfsd_break_deleg_cb, |
2168 | 2168 | .fl_release_private = nfsd_release_deleg_cb, |
2169 | 2169 | .fl_copy_lock = nfsd_copy_lock_deleg_cb, |
... | ... | @@ -3368,7 +3368,7 @@ |
3368 | 3368 | |
3369 | 3369 | /* Hack!: For now, we're defining this just so we can use a pointer to it |
3370 | 3370 | * as a unique cookie to identify our (NFSv4's) posix locks. */ |
3371 | -static struct lock_manager_operations nfsd_posix_mng_ops = { | |
3371 | +static const struct lock_manager_operations nfsd_posix_mng_ops = { | |
3372 | 3372 | }; |
3373 | 3373 | |
3374 | 3374 | static inline void |
include/linux/fs.h
... | ... | @@ -1067,7 +1067,7 @@ |
1067 | 1067 | unsigned long fl_break_time; /* for nonblocking lease breaks */ |
1068 | 1068 | |
1069 | 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 | 1071 | union { |
1072 | 1072 | struct nfs_lock_info nfs_fl; |
1073 | 1073 | struct nfs4_lock_info nfs4_fl; |
include/linux/lockd/lockd.h
... | ... | @@ -395,7 +395,7 @@ |
395 | 395 | &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); |
396 | 396 | } |
397 | 397 | |
398 | -extern struct lock_manager_operations nlmsvc_lock_operations; | |
398 | +extern const struct lock_manager_operations nlmsvc_lock_operations; | |
399 | 399 | |
400 | 400 | #endif /* __KERNEL__ */ |
401 | 401 |