Skip to content

Commit 291adeb

Browse files
YueHaibingJ. Bruce Fields
authored andcommitted
lockd: Make two symbols static
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>
1 parent f85d933 commit 291adeb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/lockd/clntproc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ nlmclnt_get_lockowner(struct nlm_lockowner *lockowner)
5454
return lockowner;
5555
}
5656

57-
void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
57+
static void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
5858
{
5959
if (!refcount_dec_and_lock(&lockowner->count, &lockowner->host->h_lock))
6060
return;

‎fs/lockd/svclock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static void nlmsvc_locks_release_private(struct file_lock *fl)
406406
nlmsvc_put_lockowner((struct nlm_lockowner *)fl->fl_owner);
407407
}
408408

409-
const struct file_lock_operations nlmsvc_lock_ops = {
409+
static const struct file_lock_operations nlmsvc_lock_ops = {
410410
.fl_copy_lock = nlmsvc_locks_copy_lock,
411411
.fl_release_private = nlmsvc_locks_release_private,
412412
};

0 commit comments

Comments
 (0)