Merge tag 'nfsd-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Sep 2023 23:48:44 +0000 (16:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Sep 2023 23:48:44 +0000 (16:48 -0700)
Pull nfsd fixes from Chuck Lever:

 - Use correct order when encoding NFSv4 RENAME change_info

 - Fix a potential oops during NFSD shutdown

* tag 'nfsd-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  NFSD: fix possible oops when nfsd/pool_stats is closed.
  nfsd: fix change_info in NFSv4 RENAME replies

fs/nfsd/nfs4proc.c
fs/nfsd/nfssvc.c

index 5ca7483..4199ede 100644 (file)
@@ -1058,8 +1058,8 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                             rename->rn_tname, rename->rn_tnamelen);
        if (status)
                return status;
-       set_change_info(&rename->rn_sinfo, &cstate->current_fh);
-       set_change_info(&rename->rn_tinfo, &cstate->save_fh);
+       set_change_info(&rename->rn_sinfo, &cstate->save_fh);
+       set_change_info(&rename->rn_tinfo, &cstate->current_fh);
        return nfs_ok;
 }
 
index 1582af3..c7af109 100644 (file)
@@ -1082,11 +1082,12 @@ int nfsd_pool_stats_open(struct inode *inode, struct file *file)
 
 int nfsd_pool_stats_release(struct inode *inode, struct file *file)
 {
+       struct seq_file *seq = file->private_data;
+       struct svc_serv *serv = seq->private;
        int ret = seq_release(inode, file);
-       struct net *net = inode->i_sb->s_fs_info;
 
        mutex_lock(&nfsd_mutex);
-       nfsd_put(net);
+       svc_put(serv);
        mutex_unlock(&nfsd_mutex);
        return ret;
 }