On Mon, 07 Aug 2006 17:45:03 -0500, "Eric Sandeen" <[email protected]>
said:
> That looks fine to me, but I wonder if there's a cleaner way, rather
> than sprinkling these initializations in the code. If __udf_read_inode
> fails, then it calls mark_bad_inode; maybe the code should check for
> that before trying to discard prealloced blocks? I don't really know
> enough about all the UDF codepaths (by far!) to know for sure what the
> best solution is, here.
I'm certainly not an expert on this code either, but it seems like doing
the initializations once in udf_alloc_inode() makes the most sense. As
I said it should fix both of the scenarios you & I experienced as well
as any others that assume the udf_inode_info structs are zeroed. Now
that I look at it again, I think it also makes the initializations in
udf_new_inode() redundant.
So, assuming my previous patch is applied and yours is not, I think the
following is right:
---
Signed-off-by: Dan Bastone <[email protected]>
--- linux-2.6.17.7/fs/udf/ialloc.c.orig
+++ linux-2.6.17.7/fs/udf/ialloc.c
@@ -84,11 +84,6 @@
}
mutex_lock(&sbi->s_alloc_mutex);
- UDF_I_UNIQUE(inode) = 0;
- UDF_I_LENEXTENTS(inode) = 0;
- UDF_I_NEXT_ALLOC_BLOCK(inode) = 0;
- UDF_I_NEXT_ALLOC_GOAL(inode) = 0;
- UDF_I_STRAT4096(inode) = 0;
if (UDF_SB_LVIDBH(sb))
{
struct logicalVolHeaderDesc *lvhd;
---
Dan
--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow
-
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]