On Fri, 2012-01-13 at 11:56 -0800, Sage Weil wrote:
> On Fri, 13 Jan 2012, Alex Elder wrote:
> > The ceph_mds_session s_cap_gen field can be accessed concurrently
> > and is used for synchronization. Change it to be an atomic_t to
> > make the desired atomicity explicit.
> >
> > Signed-off-by: Alex Elder <[email protected]>
. . .
> > @@ -2874,7 +2874,7 @@ void ceph_mdsc_lease_release(struct
> > ceph_mds_client *mdsc, struct inode *inode,
> > di = ceph_dentry(dentry);
> > if (!di || !di->lease_session ||
> > di->lease_session->s_mds < 0 ||
> > - di->lease_gen != di->lease_session->s_cap_gen ||
> > + di->lease_gen != atomic_read(&di->lease_session->s_cap_gen) ||
>
> Okay, this one needs synchronization. It looks like the only one, too.
> Can we just use the spinlock for it?
I'll rework the series. I will change this one to just include
the use of the spinlock instead in this one spot, and will
drop the next one.
Thanks a lot for the review.
-Alex
. . .
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html