[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0609041835590.28823@yvahk01.tjqt.qr>
Date: Mon, 4 Sep 2006 18:55:53 +0200 (MEST)
From: Jan Engelhardt <jengelh@...ux01.gwdg.de>
To: Steven Whitehouse <swhiteho@...hat.com>
cc: linux-kernel@...r.kernel.org,
Russell Cattelan <cattelan@...hat.com>,
David Teigland <teigland@...hat.com>,
Ingo Molnar <mingo@...e.hu>, hch@...radead.org
Subject: Re: [PATCH 09/16] GFS2: Extended attribute & ACL support
>+#if 0
>+ else if ((ip->i_di.di_flags & GFS2_DIF_EA_PACKED) &&
>+ er->er_type == GFS2_EATYPE_SYS)
>+ return 1;
>+#endif
>+/**
>+ * ea_get_unstuffed - actually copies the unstuffed data into the
>+ * request buffer
>+ * @ip:
>+ * @ea:
>+ * @data:
>+ *
>+ * Returns: errno
>+ */
There are more of these. If you have the time, please fill in.
>+ *dataptr++ = cpu_to_be64((uint64_t)bh->b_blocknr);
At least on i386, this cast seems unnecessary, since
include/asm-i386/byteorder.h:
static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
but someone else should probably prove me right/wrong.
>+ if (private)
>+ ea_set_remove_stuffed(ip, (struct gfs2_ea_location *)private);
private is a void *, ergo nocast.
>+ gfs2_glock_dq_uninit(&al->al_ri_gh);
Another Ken Preslan gem? al_ri_gh_t then.
>+ return (5 + (ea->ea_name_len + 1));
()
>+unsigned int gfs2_ea_name2type(const char *name, char **truncated_name)
>+{
>+ unsigned int type;
>+
>+ if (strncmp(name, "system.", 7) == 0) {
>+ type = GFS2_EATYPE_SYS;
>+ if (truncated_name)
>+ *truncated_name = strchr(name, '.') + 1;
Since we already know where the dot is (otherwise, strncmp would have failed),
we can omit the relookup with strchr:
*truncated_name = name + sizeof("system.") - 1;
>+ } else if (strncmp(name, "user.", 5) == 0) {
>+ type = GFS2_EATYPE_USR;
>+ if (truncated_name)
>+ *truncated_name = strchr(name, '.') + 1;
>+ } else if (strncmp(name, "security.", 9) == 0) {
>+ type = GFS2_EATYPE_SECURITY;
>+ if (truncated_name)
>+ *truncated_name = strchr(name, '.') + 1;
Similarly.
Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists