Re: [PATCH 08/16] GFS2: Resource group code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 2006-09-04 at 16:50 +0200, Jan Engelhardt wrote:
> >+#define BFITNOENT 0xFFFFFFFF
> 
> See previous mail, (uint32_t)-1 / (uint32_t)~0 or leave it.
> 
ok.

> >+static inline int rgrp_contains_block(struct gfs2_rindex *ri, uint64_t block)
> >+{
> >+	uint64_t first = ri->ri_data0;
> >+	uint64_t last = first + ri->ri_data;
> >+	return !!(first <= block && block < last);
> >+}
> 
> No need for the !!, the expression !! is operating on is already a boolean.
> IOW,
> 
> 	return first <= block && block < last;
> 
Now fixed in:

http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=16910427e1eb2a8069708ee24406d2d465381ebd

> 
> >+/**
> >+ * gfs2_alloc_put - throw away the struct gfs2_alloc for an inode
> >+ * @ip: the inode
> >+ *
> >+ */
> >+
> >+void gfs2_alloc_put(struct gfs2_inode *ip)
> >+{
> >+	return;
> >+}
> 
> Missing some code? Code that comes later?
> 
> 
> Jan Engelhardt

Well the allocation structure used to be kmalloc'ed and free'd by this
function and gfs2_alloc_get. I changed that to put it inline in the
struct gfs2_inode since there didn't seem a lot of point in having it
dynamically allocated. I had left this function though since it was
useful to have some demarcation points in the code which showed where
the structure was in use. My plan was to later add some debugging to
detect any use outside of those points, hence, I'd left in this
function.

It could be removed now, but I'd prefer to give it a stay of execution
for a little while at least if nobody has any strong objections to that,

Steve.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux