[PATCH 20/24] udf: convert UDF_UPDATE_UDFREV macro to udf_update_revision function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marcin Slusarz <[email protected]>
CC: Ben Fennema <[email protected]>
CC: Jan Kara <[email protected]>
---
 fs/udf/ialloc.c |    2 +-
 fs/udf/udf_sb.h |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index 269f588..4d1684c 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -123,7 +123,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
 	UDF_I_USE(inode) = 0;
 	if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE)) {
 		UDF_I_EFE(inode) = 1;
-		UDF_UPDATE_UDFREV(inode->i_sb, UDF_VERS_USE_EXTENDED_FE);
+		udf_update_revision(inode->i_sb, UDF_VERS_USE_EXTENDED_FE);
 		UDF_I_DATA(inode) = kzalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL);
 	} else {
 		UDF_I_EFE(inode) = 0;
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 565c9ef..aee5942 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -138,6 +138,12 @@ static inline struct inode *udf_sb_vat_inode(struct super_block *sb)
 	return udf_sb(sb)->s_vat_inode;
 }
 
+static inline void udf_update_revision(struct super_block *sb, __u16 revision)
+{
+	if (revision > udf_sb_revision(sb))
+		udf_sb(sb)->s_udfrev = revision;
+}
+
 #define UDF_SB_ALLOC_BITMAP(X,Y,Z)\
 {\
 	int nr_groups = ((UDF_SB_PARTLEN((X),(Y)) + (sizeof(struct spaceBitmapDesc) << 3) +\
@@ -176,8 +182,6 @@ static inline struct inode *udf_sb_vat_inode(struct super_block *sb)
 #define UDF_SET_FLAG(X,Y)			( udf_sb(X)->s_flags |= ( 1 << (Y) ) )
 #define UDF_CLEAR_FLAG(X,Y)			( udf_sb(X)->s_flags &= ~( 1 << (Y) ) )
 
-#define UDF_UPDATE_UDFREV(X,Y)			( ((Y) > udf_sb_revision(X)) ? udf_sb(X)->s_udfrev = (Y) : udf_sb_revision(X) )
-
 #define UDF_SB_PARTTYPE(X,Y)			( udf_sb_partmaps(X)[(Y)].s_partition_type )
 #define UDF_SB_PARTROOT(X,Y)			( udf_sb_partmaps(X)[(Y)].s_partition_root )
 #define UDF_SB_PARTLEN(X,Y)			( udf_sb_partmaps(X)[(Y)].s_partition_len )
-- 
1.5.3.4

--
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]
  Powered by Linux