Skip to content

Commit

Permalink
nfsd: fix kernel test robot warning in SSC code
Browse files Browse the repository at this point in the history
Fix by initializing pointer nfsd4_ssc_umount_item with NULL instead of 0.
Replace return value of nfsd4_ssc_setup_dul with __be32 instead of int.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Dai Ngo <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
daimngo authored and J. Bruce Fields committed Jul 7, 2021
1 parent 3518c86 commit f47dc2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ extern void nfs_sb_deactive(struct super_block *sb);
/*
* setup a work entry in the ssc delayed unmount list.
*/
static int nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt)
{
struct nfsd4_ssc_umount_item *ni = 0;
Expand Down Expand Up @@ -1399,7 +1399,7 @@ nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
bool found = false;
long timeout;
struct nfsd4_ssc_umount_item *tmp;
struct nfsd4_ssc_umount_item *ni = 0;
struct nfsd4_ssc_umount_item *ni = NULL;
struct nfsd_net *nn = net_generic(dst->nf_net, nfsd_net_id);

nfs42_ssc_close(src->nf_file);
Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -5514,7 +5514,7 @@ EXPORT_SYMBOL_GPL(nfsd4_ssc_init_umount_work);
*/
static void nfsd4_ssc_shutdown_umount(struct nfsd_net *nn)
{
struct nfsd4_ssc_umount_item *ni = 0;
struct nfsd4_ssc_umount_item *ni = NULL;
struct nfsd4_ssc_umount_item *tmp;

spin_lock(&nn->nfsd_ssc_lock);
Expand Down

0 comments on commit f47dc2d

Please sign in to comment.