directory.c (51e38c92bed26f648ec187c4400fa7512fcd8067) | directory.c (df97f64dfa317a5485daf247b6c043a584ef95f9) |
---|---|
1/* 2 * directory.c 3 * 4 * PURPOSE 5 * Directory related functions 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 237 unchanged lines hidden (view full) --- 246 int err = 0; 247 248 iter->dir = dir; 249 iter->bh[0] = iter->bh[1] = NULL; 250 iter->pos = pos; 251 iter->elen = 0; 252 iter->epos.bh = NULL; 253 iter->name = NULL; | 1/* 2 * directory.c 3 * 4 * PURPOSE 5 * Directory related functions 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 237 unchanged lines hidden (view full) --- 246 int err = 0; 247 248 iter->dir = dir; 249 iter->bh[0] = iter->bh[1] = NULL; 250 iter->pos = pos; 251 iter->elen = 0; 252 iter->epos.bh = NULL; 253 iter->name = NULL; |
254 iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL); 255 if (!iter->namebuf) 256 return -ENOMEM; | 254 /* 255 * When directory is verified, we don't expect directory iteration to 256 * fail and it can be difficult to undo without corrupting filesystem. 257 * So just do not allow memory allocation failures here. 258 */ 259 iter->namebuf = kmalloc(UDF_NAME_LEN_CS0, GFP_KERNEL | __GFP_NOFAIL); |
257 258 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { 259 err = udf_copy_fi(iter); 260 goto out; 261 } 262 263 if (inode_bmap(dir, iter->pos >> dir->i_blkbits, &iter->epos, 264 &iter->eloc, &iter->elen, &iter->loffset) != --- 270 unchanged lines hidden --- | 260 261 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { 262 err = udf_copy_fi(iter); 263 goto out; 264 } 265 266 if (inode_bmap(dir, iter->pos >> dir->i_blkbits, &iter->epos, 267 &iter->eloc, &iter->elen, &iter->loffset) != --- 270 unchanged lines hidden --- |