Loading fs/nfsd/filecache.c +2 −3 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ static bool nfsd_file_lru_remove(struct nfsd_file *nf) struct nfsd_file * nfsd_file_get(struct nfsd_file *nf) { if (likely(refcount_inc_not_zero(&nf->nf_ref))) if (nf && refcount_inc_not_zero(&nf->nf_ref)) return nf; return NULL; } Loading Loading @@ -1107,7 +1107,6 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp, rcu_read_lock(); nf = rhashtable_lookup(&nfsd_file_rhash_tbl, &key, nfsd_file_rhash_params); if (nf) nf = nfsd_file_get(nf); rcu_read_unlock(); Loading fs/nfsd/nfs4state.c +1 −3 Original line number Diff line number Diff line Loading @@ -602,9 +602,7 @@ put_nfs4_file(struct nfs4_file *fi) static struct nfsd_file * __nfs4_get_fd(struct nfs4_file *f, int oflag) { if (f->fi_fds[oflag]) return nfsd_file_get(f->fi_fds[oflag]); return NULL; } static struct nfsd_file * Loading Loading
fs/nfsd/filecache.c +2 −3 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ static bool nfsd_file_lru_remove(struct nfsd_file *nf) struct nfsd_file * nfsd_file_get(struct nfsd_file *nf) { if (likely(refcount_inc_not_zero(&nf->nf_ref))) if (nf && refcount_inc_not_zero(&nf->nf_ref)) return nf; return NULL; } Loading Loading @@ -1107,7 +1107,6 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp, rcu_read_lock(); nf = rhashtable_lookup(&nfsd_file_rhash_tbl, &key, nfsd_file_rhash_params); if (nf) nf = nfsd_file_get(nf); rcu_read_unlock(); Loading
fs/nfsd/nfs4state.c +1 −3 Original line number Diff line number Diff line Loading @@ -602,9 +602,7 @@ put_nfs4_file(struct nfs4_file *fi) static struct nfsd_file * __nfs4_get_fd(struct nfs4_file *f, int oflag) { if (f->fi_fds[oflag]) return nfsd_file_get(f->fi_fds[oflag]); return NULL; } static struct nfsd_file * Loading