⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1011.udf.patch

📁 sm86xx内核源包括补丁( GPL )的
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/fs/udf/balloc.c linuxmips-2.4.30/fs/udf/balloc.c--- linuxmips-2.4.30.ref/fs/udf/balloc.c	2002-06-26 15:36:22.000000000 -0700+++ linuxmips-2.4.30/fs/udf/balloc.c	2007-05-10 10:49:29.000000000 -0700@@ -15,7 +15,7 @@  *		ftp://prep.ai.mit.edu/pub/gnu/GPL  *	Each contributing author retains all rights to their own work.  *- *  (C) 1999-2001 Ben Fennema+ *  (C) 1999-2003 Ben Fennema  *  (C) 1999 Stelias Computing Inc  *  * HISTORY@@ -144,7 +144,11 @@ }  static void udf_bitmap_free_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct udf_bitmap *bitmap, lb_addr bloc, uint32_t offset, uint32_t count) { 	struct buffer_head * bh = NULL;@@ -195,7 +199,11 @@ 		else 		{ 			if (inode)+#ifndef OLD_QUOTA 				DQUOT_FREE_BLOCK(inode, 1);+#else+				DQUOT_FREE_BLOCK(sb, inode, 1);+#endif 			if (UDF_SB_LVIDBH(sb)) 			{ 				UDF_SB_LVID(sb)->freeSpaceTable[UDF_SB_PARTITION(sb)] =@@ -219,7 +227,11 @@ }  static int udf_bitmap_prealloc_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct udf_bitmap *bitmap, uint16_t partition, uint32_t first_block, 	uint32_t block_count) {@@ -254,12 +266,20 @@ 	{ 		if (!udf_test_bit(bit, bh->b_data)) 			goto out;+#ifndef OLD_QUOTA 		else if (DQUOT_PREALLOC_BLOCK(inode, 1))+#else+		else if (DQUOT_PREALLOC_BLOCK(sb, inode, 1))+#endif 			goto out; 		else if (!udf_clear_bit(bit, bh->b_data)) 		{ 			udf_debug("bit already cleared for block %d\n", bit);+#ifndef OLD_QUOTA 			DQUOT_FREE_BLOCK(inode, 1);+#else+			DQUOT_FREE_BLOCK(sb, inode, 1);+#endif 			goto out; 		} 		block_count --;@@ -283,7 +303,11 @@ }  static int udf_bitmap_new_block(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct udf_bitmap *bitmap, uint16_t partition, uint32_t goal, int *err) { 	int newbit, bit=0, block, block_group, group_start;@@ -387,7 +411,11 @@ 	/* 	 * Check quota for allocation of this block. 	 */+#ifndef OLD_QUOTA 	if (inode && DQUOT_ALLOC_BLOCK(inode, 1))+#else+	if (inode && DQUOT_ALLOC_BLOCK(sb, inode, 1))+#endif 	{ 		unlock_super(sb); 		*err = -EDQUOT;@@ -423,7 +451,11 @@ }  static void udf_table_free_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct inode * table, lb_addr bloc, uint32_t offset, uint32_t count) { 	uint32_t start, end;@@ -446,7 +478,11 @@ 	/* We do this up front - There are some error conditions that could occure, 	   but.. oh well */ 	if (inode)+#ifndef OLD_QUOTA 		DQUOT_FREE_BLOCK(inode, count);+#else+		DQUOT_FREE_BLOCK(sb, inode, count);+#endif 	if (UDF_SB_LVIDBH(sb)) 	{ 		UDF_SB_LVID(sb)->freeSpaceTable[UDF_SB_PARTITION(sb)] =@@ -461,8 +497,7 @@ 	elen = 0; 	obloc = nbloc = UDF_I_LOCATION(table); -	obh = nbh = udf_tread(sb, udf_get_lb_pblock(sb, nbloc, 0));-	atomic_inc(&nbh->b_count);+	obh = nbh = NULL;  	while (count && (etype = 		udf_next_aext(table, &nbloc, &nextoffset, &eloc, &elen, &nbh, 1)) != -1)@@ -506,7 +541,7 @@ 			udf_write_aext(table, obloc, &oextoffset, eloc, elen, obh, 1); 		} -		if (memcmp(&nbloc, &obloc, sizeof(lb_addr)))+		if (nbh != obh) 		{ 			i = -1; 			obloc = nbloc;@@ -580,7 +615,10 @@ 			{ 				loffset = nextoffset; 				aed->lengthAllocDescs = cpu_to_le32(adsize);-				sptr = (obh)->b_data + nextoffset - adsize;+				if (obh)+					sptr = UDF_I_DATA(inode) + nextoffset -  udf_file_entry_alloc_offset(inode) + UDF_I_LENEATTR(inode) - adsize;+				else+					sptr = obh->b_data + nextoffset - adsize; 				dptr = nbh->b_data + sizeof(struct allocExtDesc); 				memcpy(dptr, sptr, adsize); 				nextoffset = sizeof(struct allocExtDesc) + adsize;@@ -591,8 +629,8 @@ 				aed->lengthAllocDescs = cpu_to_le32(0); 				sptr = (obh)->b_data + nextoffset; 				nextoffset = sizeof(struct allocExtDesc);-	-				if (memcmp(&UDF_I_LOCATION(table), &obloc, sizeof(lb_addr)))++				if (obh) 				{ 					aed = (struct allocExtDesc *)(obh)->b_data; 					aed->lengthAllocDescs =@@ -631,15 +669,20 @@ 					break; 				} 			}-			udf_update_tag(obh->b_data, loffset);-			mark_buffer_dirty(obh);+			if (obh)+			{+				udf_update_tag(obh->b_data, loffset);+				mark_buffer_dirty(obh);+			}+			else+				mark_inode_dirty(table); 		}  		if (elen) /* It's possible that stealing the block emptied the extent */ 		{ 			udf_write_aext(table, nbloc, &nextoffset, eloc, elen, nbh, 1); -			if (!memcmp(&UDF_I_LOCATION(table), &nbloc, sizeof(lb_addr)))+			if (!nbh) 			{ 				UDF_I_LENALLOC(table) += adsize; 				mark_inode_dirty(table);@@ -665,7 +708,11 @@ }  static int udf_table_prealloc_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct inode *table, uint16_t partition, uint32_t first_block, 	uint32_t block_count) {@@ -690,7 +737,7 @@ 	extoffset = sizeof(struct unallocSpaceEntry); 	bloc = UDF_I_LOCATION(table); -	bh = udf_tread(sb, udf_get_lb_pblock(sb, bloc, 0));+	bh = NULL; 	eloc.logicalBlockNum = 0xFFFFFFFF;  	while (first_block != eloc.logicalBlockNum && (etype =@@ -706,7 +753,11 @@ 		extoffset -= adsize;  		alloc_count = (elen >> sb->s_blocksize_bits);+#ifndef OLD_QUOTA 		if (inode && DQUOT_PREALLOC_BLOCK(inode, alloc_count > block_count ? block_count : alloc_count))+#else+		if (inode && DQUOT_PREALLOC_BLOCK(sb, inode, alloc_count > block_count ? block_count : alloc_count))+#endif 			alloc_count = 0; 		else if (alloc_count > block_count) 		{@@ -735,7 +786,11 @@ }  static int udf_table_new_block(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	struct inode *table, uint16_t partition, uint32_t goal, int *err) { 	uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;@@ -768,8 +823,7 @@ 	extoffset = sizeof(struct unallocSpaceEntry); 	bloc = UDF_I_LOCATION(table); -	goal_bh = bh = udf_tread(sb, udf_get_lb_pblock(sb, bloc, 0));-	atomic_inc(&goal_bh->b_count);+	goal_bh = bh = NULL;  	while (spread && (etype = 		udf_next_aext(table, &bloc, &extoffset, &eloc, &elen, &bh, 1)) != -1)@@ -819,7 +873,11 @@ 	goal_eloc.logicalBlockNum ++; 	goal_elen -= sb->s_blocksize; +#ifndef OLD_QUOTA 	if (inode && DQUOT_ALLOC_BLOCK(inode, 1))+#else+	if (inode && DQUOT_ALLOC_BLOCK(sb, inode, 1))+#endif 	{ 		udf_release_data(goal_bh); 		unlock_super(sb);@@ -847,7 +905,11 @@ }  inline void udf_free_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	lb_addr bloc, uint32_t offset, uint32_t count) { 	uint16_t partition = bloc.partitionReferenceNum;@@ -881,7 +943,11 @@ }  inline int udf_prealloc_blocks(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	uint16_t partition, uint32_t first_block, uint32_t block_count) { 	if (UDF_SB_PARTFLAGS(sb, partition) & UDF_PART_FLAG_UNALLOC_BITMAP)@@ -913,7 +979,11 @@ }  inline int udf_new_block(struct super_block * sb,+#ifndef OLD_QUOTA 	struct inode * inode,+#else+	const struct inode * inode,+#endif 	uint16_t partition, uint32_t goal, int *err) { 	if (UDF_SB_PARTFLAGS(sb, partition) & UDF_PART_FLAG_UNALLOC_BITMAP)diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/fs/udf/crc.c linuxmips-2.4.30/fs/udf/crc.c--- linuxmips-2.4.30.ref/fs/udf/crc.c	2002-06-26 15:36:22.000000000 -0700+++ linuxmips-2.4.30/fs/udf/crc.c	2007-05-10 10:49:29.000000000 -0700@@ -84,7 +84,7 @@  *	July 21, 1997 - Andrew E. Mileski  *	Adapted from OSTA-UDF(tm) 1.50 standard.  */-extern uint16_t+uint16_t udf_crc(uint8_t *data, uint32_t size, uint16_t crc) { 	while (size--)diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/fs/udf/dir.c linuxmips-2.4.30/fs/udf/dir.c--- linuxmips-2.4.30.ref/fs/udf/dir.c	2002-06-26 15:36:22.000000000 -0700+++ linuxmips-2.4.30/fs/udf/dir.c	2007-05-10 10:49:29.000000000 -0700@@ -15,11 +15,11 @@  *		ftp://prep.ai.mit.edu/pub/gnu/GPL  *	Each contributing author retains all rights to their own work.  *- *  (C) 1998-2001 Ben Fennema+ *  (C) 1998-2004 Ben Fennema  *  * HISTORY  *- *  10/05/98 dgb  Split directory operations into it's own file+ *  10/05/98 dgb  Split directory operations into its own file  *                Implemented directory reads via do_udf_readdir  *  10/06/98      Made directory operations work!  *  11/17/98      Rewrote directory to support ICBTAG_FLAG_AD_LONG@@ -35,6 +35,7 @@ #include <linux/errno.h> #include <linux/mm.h> #include <linux/slab.h>+#include <linux/smp_lock.h>  #include "udf_i.h" #include "udf_sb.h"@@ -46,10 +47,10 @@ /* readdir and lookup functions */  struct file_operations udf_dir_operations = {-	read:			generic_read_dir,-	readdir:		udf_readdir,-	ioctl:			udf_ioctl,-	fsync:			udf_fsync_file,+	.read			= generic_read_dir,+	.readdir		= udf_readdir,+	.ioctl			= udf_ioctl,+	.fsync			= udf_fsync_file, };  /*@@ -83,15 +84,21 @@ 	struct inode *dir = filp->f_dentry->d_inode; 	int result; +	lock_kernel();+ 	if ( filp->f_pos == 0 )  	{ 		if (filldir(dirent, ".", 1, filp->f_pos, dir->i_ino, DT_DIR) < 0)+		{+			unlock_kernel(); 			return 0;+		} 		filp->f_pos ++; 	}   	result = do_udf_readdir(dir, filp, filldir, dirent); 	UPDATE_ATIME(dir);+	unlock_kernel();  	return result; } @@ -104,7 +111,7 @@ 	int block, iblock; 	loff_t nf_pos = filp->f_pos - 1; 	int flen;-	char fname[255];+	char fname[UDF_NAME_LEN]; 	char *nameptr; 	uint16_t liu; 	uint8_t lfi;@@ -122,7 +129,9 @@ 		nf_pos = (udf_ext0_offset(dir) >> 2);  	fibh.soffset = fibh.eoffset = (nf_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;-	if (inode_bmap(dir, nf_pos >> (dir->i_sb->s_blocksize_bits - 2),+	if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)+		fibh.sbh = fibh.ebh = NULL;+	else if (inode_bmap(dir, nf_pos >> (dir->i_sb->s_blocksize_bits - 2), 		&bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30)) 	{ 		offset >>= dir->i_sb->s_blocksize_bits;@@ -136,6 +145,34 @@ 		} 		else 			offset = 0;++		if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))+		{+			udf_release_data(bh);+			return -EIO;+		}+	+		if (!(offset & ((16 >> (dir->i_sb->s_blocksize_bits - 9))-1)))+		{+			i = 16 >> (dir->i_sb->s_blocksize_bits - 9);+			if (i+offset > (elen >> dir->i_sb->s_blocksize_bits))+				i = (elen >> dir->i_sb->s_blocksize_bits)-offset;+			for (num=0; i>0; i--)+			{+				block = udf_get_lb_pblock(dir->i_sb, eloc, offset+i);+				tmp = udf_tgetblk(dir->i_sb, block);+				if (tmp && !buffer_uptodate(tmp) && !buffer_locked(tmp))+					bha[num++] = tmp;+				else+					brelse(tmp);+			}+			if (num)+			{+				ll_rw_block(READA, num, bha);+				for (i=0; i<num; i++)+					brelse(bha[i]);+			}+		} 	} 	else 	{@@ -143,34 +180,6 @@ 		return -ENOENT; 	} -	if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))-	{-		udf_release_data(bh);-		return -EIO;-	}--	if (!(offset & ((16 >> (dir->i_sb->s_blocksize_bits - 9))-1)))-	{-		i = 16 >> (dir->i_sb->s_blocksize_bits - 9);-		if (i+offset > (elen >> dir->i_sb->s_blocksize_bits))-			i = (elen >> dir->i_sb->s_blocksize_bits)-offset;-		for (num=0; i>0; i--)-		{-			block = udf_get_lb_pblock(dir->i_sb, eloc, offset+i);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -