summary refs log tree commit diff
path: root/fs/udf/truncate.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 04:20:42 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:35 -0800
commitc0b344385fa05f6bea462e707fcba89f9e2776c2 (patch)
tree391376739ffb0b5c9dfcf294c9f746d7ff2daf66 /fs/udf/truncate.c
parent5e0f001736651f6f859aeca95f895c829d223cdb (diff)
downloadlinux-c0b344385fa05f6bea462e707fcba89f9e2776c2.tar.gz
udf: remove UDF_I_* macros and open code them
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/truncate.c')
-rw-r--r--fs/udf/truncate.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
index 5c1bf921f400..8eb1d24ce5ce 100644
--- a/fs/udf/truncate.c
+++ b/fs/udf/truncate.c
@@ -75,16 +75,16 @@ void udf_truncate_tail_extent(struct inode *inode)
 	int8_t etype = -1, netype;
 	int adsize;
 
-	if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
-	    inode->i_size == UDF_I_LENEXTENTS(inode))
+	if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB ||
+	    inode->i_size == UDF_I(inode)->i_lenExtents)
 		return;
 	/* Are we going to delete the file anyway? */
 	if (inode->i_nlink == 0)
 		return;
 
-	if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
+	if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
 		adsize = sizeof(short_ad);
-	else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
+	else if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_LONG)
 		adsize = sizeof(long_ad);
 	else
 		BUG();
@@ -117,7 +117,7 @@ void udf_truncate_tail_extent(struct inode *inode)
 	}
 	/* This inode entry is in-memory only and thus we don't have to mark
 	 * the inode dirty */
-	UDF_I_LENEXTENTS(inode) = inode->i_size;
+	UDF_I(inode)->i_lenExtents = inode->i_size;
 	brelse(epos.bh);
 }
 
@@ -130,18 +130,18 @@ void udf_discard_prealloc(struct inode *inode)
 	int8_t etype = -1, netype;
 	int adsize;
 
-	if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
-	    inode->i_size == UDF_I_LENEXTENTS(inode))
+	if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB ||
+	    inode->i_size == UDF_I(inode)->i_lenExtents)
 		return;
 
-	if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
+	if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
 		adsize = sizeof(short_ad);
-	else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
+	else if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_LONG)
 		adsize = sizeof(long_ad);
 	else
 		adsize = 0;
 
-	epos.block = UDF_I_LOCATION(inode);
+	epos.block = UDF_I(inode)->i_location;
 
 	/* Find the last extent in the file */
 	while ((netype = udf_next_aext(inode, &epos, &eloc, &elen, 1)) != -1) {
@@ -153,7 +153,7 @@ void udf_discard_prealloc(struct inode *inode)
 		lbcount -= elen;
 		extent_trunc(inode, &epos, eloc, etype, elen, 0);
 		if (!epos.bh) {
-			UDF_I_LENALLOC(inode) =
+			UDF_I(inode)->i_lenAlloc =
 				epos.offset -
 				udf_file_entry_alloc_offset(inode);
 			mark_inode_dirty(inode);
@@ -174,7 +174,7 @@ void udf_discard_prealloc(struct inode *inode)
 	}
 	/* This inode entry is in-memory only and thus we don't have to mark
 	 * the inode dirty */
-	UDF_I_LENEXTENTS(inode) = lbcount;
+	UDF_I(inode)->i_lenExtents = lbcount;
 	brelse(epos.bh);
 }
 
@@ -190,9 +190,9 @@ void udf_truncate_extents(struct inode *inode)
 	loff_t byte_offset;
 	int adsize;
 
-	if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
+	if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
 		adsize = sizeof(short_ad);
-	else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
+	else if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_LONG)
 		adsize = sizeof(long_ad);
 	else
 		BUG();
@@ -227,7 +227,7 @@ void udf_truncate_extents(struct inode *inode)
 							0, indirect_ext_len);
 				} else {
 					if (!epos.bh) {
-						UDF_I_LENALLOC(inode) =
+						UDF_I(inode)->i_lenAlloc =
 								lenalloc;
 						mark_inode_dirty(inode);
 					} else {
@@ -275,7 +275,7 @@ void udf_truncate_extents(struct inode *inode)
 					indirect_ext_len);
 		} else {
 			if (!epos.bh) {
-				UDF_I_LENALLOC(inode) = lenalloc;
+				UDF_I(inode)->i_lenAlloc = lenalloc;
 				mark_inode_dirty(inode);
 			} else {
 				struct allocExtDesc *aed =
@@ -325,7 +325,7 @@ void udf_truncate_extents(struct inode *inode)
 						(sb->s_blocksize - 1)) != 0));
 		}
 	}
-	UDF_I_LENEXTENTS(inode) = inode->i_size;
+	UDF_I(inode)->i_lenExtents = inode->i_size;
 
 	brelse(epos.bh);
 }