lkml.org 
[lkml]   [2023]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v20 13/32] ceph: Provide a splice-read stub
Date
Xiubo Li <xiubli@redhat.com> wrote:

> > + ret = ceph_get_caps(in, CEPH_CAP_FILE_RD, want, -1, &got);
> > + if (ret < 0) {
> > + ceph_end_io_read(inode);
> > + return ret;
> > + }
> > +
> > + if ((got & (CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO)) == 0) {
> > + dout("splice_read/sync %p %llx.%llx %llu~%zu got cap refs on %s\n",
> > + inode, ceph_vinop(inode), *ppos, len,
> > + ceph_cap_string(got));
> > +
> > + ceph_end_io_read(inode);
> > + return direct_splice_read(in, ppos, pipe, len, flags);
>
> Shouldn't we release cap ref before returning here ?

Ummm... Even if we got no caps?

David

\
 
 \ /
  Last update: 2023-05-19 11:26    [W:0.254 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site