[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/6] gnttab: eliminate several explicit version checks
On 15/06/15 13:24, Jan Beulich wrote: > @@ -1977,10 +1969,6 @@ __acquire_grant_for_copy( > > read_lock(&rgt->lock); > > - if ( rgt->gt_version == 0 ) > - PIN_FAIL(gt_unlock_out, GNTST_general_error, > - "remote grant table not ready\n"); > - > if ( unlikely(gref >= nr_grant_entries(rgt)) ) > PIN_FAIL(gt_unlock_out, GNTST_bad_gntref, > "Bad grant reference %ld\n", gref); > @@ -2482,19 +2470,15 @@ gnttab_set_version(XEN_GUEST_HANDLE_PARA > change the version number, except for the first 8 entries which > are allowed to be in use (xenstore/xenconsole keeps them mapped). > (You need to change the version number for e.g. kexec.) */ > - if ( gt->gt_version != 0 ) > + for ( i = GNTTAB_NR_RESERVED_ENTRIES; i < nr_grant_entries(gt); i++ ) > { > - for ( i = GNTTAB_NR_RESERVED_ENTRIES; i < nr_grant_entries(gt); i++ ) > + if ( read_atomic(&_active_entry(gt, i).pin) != 0 ) > { > - if ( read_atomic(&_active_entry(gt, i).pin) != 0 ) > - { > - gdprintk(XENLOG_WARNING, > - "tried to change grant table version from %d to %d, > but some grant entries still in use\n", > - gt->gt_version, > - op.version); > - res = -EBUSY; > - goto out_unlock; > - } > + gdprintk(XENLOG_WARNING, > + "tried to change grant table version from %d to %d, but > some grant entries still in use\n", > + gt->gt_version, op.version); As you are moving this printf, both %d should be %u. As for the main part of the change, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |