]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
lockd: Make two symbols static
authorYueHaibing <yuehaibing@huawei.com>
Tue, 28 May 2019 09:06:52 +0000 (17:06 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 3 Jul 2019 21:52:09 +0000 (17:52 -0400)
Fix sparse warnings:

fs/lockd/clntproc.c:57:6: warning: symbol 'nlmclnt_put_lockowner' was not declared. Should it be static?
fs/lockd/svclock.c:409:35: warning: symbol 'nlmsvc_lock_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/lockd/clntproc.c
fs/lockd/svclock.c

index 0ff8ad42c9da62cbe889a7cc3be0b0c81c76a851..b11f2afa84f1f453b7d441bd52171552c6b6cbf6 100644 (file)
@@ -54,7 +54,7 @@ nlmclnt_get_lockowner(struct nlm_lockowner *lockowner)
        return lockowner;
 }
 
-void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
+static void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
 {
        if (!refcount_dec_and_lock(&lockowner->count, &lockowner->host->h_lock))
                return;
index 5f9f19b817547e1301bc79d68023ab8c6353f6bf..61d3cc2283dc844689e33ef4632eeda81a6592c5 100644 (file)
@@ -406,7 +406,7 @@ static void nlmsvc_locks_release_private(struct file_lock *fl)
        nlmsvc_put_lockowner((struct nlm_lockowner *)fl->fl_owner);
 }
 
-const struct file_lock_operations nlmsvc_lock_ops = {
+static const struct file_lock_operations nlmsvc_lock_ops = {
        .fl_copy_lock = nlmsvc_locks_copy_lock,
        .fl_release_private = nlmsvc_locks_release_private,
 };