Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

const: make file_lock_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>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
6aed6285 6e1d5dcc

+4 -4
+1 -1
fs/afs/flock.c
··· 21 21 static struct workqueue_struct *afs_lock_manager; 22 22 static DEFINE_MUTEX(afs_lock_manager_mutex); 23 23 24 - static struct file_lock_operations afs_lock_ops = { 24 + static const struct file_lock_operations afs_lock_ops = { 25 25 .fl_copy_lock = afs_fl_copy_lock, 26 26 .fl_release_private = afs_fl_release_private, 27 27 };
+1 -1
fs/lockd/clntproc.c
··· 458 458 nlm_put_lockowner(fl->fl_u.nfs_fl.owner); 459 459 } 460 460 461 - static struct file_lock_operations nlmclnt_lock_ops = { 461 + static const struct file_lock_operations nlmclnt_lock_ops = { 462 462 .fl_copy_lock = nlmclnt_locks_copy_lock, 463 463 .fl_release_private = nlmclnt_locks_release_private, 464 464 };
+1 -1
fs/nfs/nfs4state.c
··· 638 638 nfs4_put_lock_state(fl->fl_u.nfs4_fl.owner); 639 639 } 640 640 641 - static struct file_lock_operations nfs4_fl_lock_ops = { 641 + static const struct file_lock_operations nfs4_fl_lock_ops = { 642 642 .fl_copy_lock = nfs4_fl_copy_lock, 643 643 .fl_release_private = nfs4_fl_release_lock, 644 644 };
+1 -1
include/linux/fs.h
··· 1066 1066 struct fasync_struct * fl_fasync; /* for lease break notifications */ 1067 1067 unsigned long fl_break_time; /* for nonblocking lease breaks */ 1068 1068 1069 - struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ 1069 + const struct file_lock_operations *fl_ops; /* Callbacks for filesystems */ 1070 1070 struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */ 1071 1071 union { 1072 1072 struct nfs_lock_info nfs_fl;