@@ -57,7 +57,7 @@ void udf_free_inode(struct inode *inode)
5757 }
5858 mutex_unlock (& sbi -> s_alloc_mutex );
5959
60- udf_free_blocks (sb , NULL , UDF_I_LOCATION (inode ), 0 , 1 );
60+ udf_free_blocks (sb , NULL , UDF_I (inode )-> i_location , 0 , 1 );
6161}
6262
6363struct inode * udf_new_inode (struct inode * dir , int mode , int * err )
@@ -66,7 +66,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
6666 struct udf_sb_info * sbi = UDF_SB (sb );
6767 struct inode * inode ;
6868 int block ;
69- uint32_t start = UDF_I_LOCATION (dir ).logicalBlockNum ;
69+ uint32_t start = UDF_I (dir )-> i_location .logicalBlockNum ;
7070
7171 inode = new_inode (sb );
7272
@@ -76,14 +76,14 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
7676 }
7777 * err = - ENOSPC ;
7878
79- UDF_I_UNIQUE (inode ) = 0 ;
80- UDF_I_LENEXTENTS (inode ) = 0 ;
81- UDF_I_NEXT_ALLOC_BLOCK (inode ) = 0 ;
82- UDF_I_NEXT_ALLOC_GOAL (inode ) = 0 ;
83- UDF_I_STRAT4096 (inode ) = 0 ;
79+ UDF_I (inode )-> i_unique = 0 ;
80+ UDF_I (inode )-> i_lenExtents = 0 ;
81+ UDF_I (inode )-> i_next_alloc_block = 0 ;
82+ UDF_I (inode )-> i_next_alloc_goal = 0 ;
83+ UDF_I (inode )-> i_strat4096 = 0 ;
8484
8585 block = udf_new_block (dir -> i_sb , NULL ,
86- UDF_I_LOCATION (dir ).partitionReferenceNum ,
86+ UDF_I (dir )-> i_location .partitionReferenceNum ,
8787 start , err );
8888 if (* err ) {
8989 iput (inode );
@@ -107,7 +107,7 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
107107 else
108108 lvidiu -> numFiles =
109109 cpu_to_le32 (le32_to_cpu (lvidiu -> numFiles ) + 1 );
110- UDF_I_UNIQUE (inode ) = uniqueID = le64_to_cpu (lvhd -> uniqueID );
110+ UDF_I (inode )-> i_unique = uniqueID = le64_to_cpu (lvhd -> uniqueID );
111111 if (!(++ uniqueID & 0x00000000FFFFFFFFUL ))
112112 uniqueID += 16 ;
113113 lvhd -> uniqueID = cpu_to_le64 (uniqueID );
@@ -123,41 +123,41 @@ struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
123123 inode -> i_gid = current -> fsgid ;
124124 }
125125
126- UDF_I_LOCATION (inode ).logicalBlockNum = block ;
127- UDF_I_LOCATION (inode ).partitionReferenceNum =
128- UDF_I_LOCATION (dir ).partitionReferenceNum ;
129- inode -> i_ino = udf_get_lb_pblock (sb , UDF_I_LOCATION (inode ), 0 );
126+ UDF_I (inode )-> i_location .logicalBlockNum = block ;
127+ UDF_I (inode )-> i_location .partitionReferenceNum =
128+ UDF_I (dir )-> i_location .partitionReferenceNum ;
129+ inode -> i_ino = udf_get_lb_pblock (sb , UDF_I (inode )-> i_location , 0 );
130130 inode -> i_blocks = 0 ;
131- UDF_I_LENEATTR (inode ) = 0 ;
132- UDF_I_LENALLOC (inode ) = 0 ;
133- UDF_I_USE (inode ) = 0 ;
131+ UDF_I (inode )-> i_lenEAttr = 0 ;
132+ UDF_I (inode )-> i_lenAlloc = 0 ;
133+ UDF_I (inode )-> i_use = 0 ;
134134 if (UDF_QUERY_FLAG (inode -> i_sb , UDF_FLAG_USE_EXTENDED_FE )) {
135- UDF_I_EFE (inode ) = 1 ;
135+ UDF_I (inode )-> i_efe = 1 ;
136136 if (UDF_VERS_USE_EXTENDED_FE > sbi -> s_udfrev )
137137 sbi -> s_udfrev = UDF_VERS_USE_EXTENDED_FE ;
138- UDF_I_DATA (inode ) = kzalloc (inode -> i_sb -> s_blocksize -
138+ UDF_I (inode )-> i_ext . i_data = kzalloc (inode -> i_sb -> s_blocksize -
139139 sizeof (struct extendedFileEntry ),
140140 GFP_KERNEL );
141141 } else {
142- UDF_I_EFE (inode ) = 0 ;
143- UDF_I_DATA (inode ) = kzalloc (inode -> i_sb -> s_blocksize -
142+ UDF_I (inode )-> i_efe = 0 ;
143+ UDF_I (inode )-> i_ext . i_data = kzalloc (inode -> i_sb -> s_blocksize -
144144 sizeof (struct fileEntry ),
145145 GFP_KERNEL );
146146 }
147- if (!UDF_I_DATA (inode )) {
147+ if (!UDF_I (inode )-> i_ext . i_data ) {
148148 iput (inode );
149149 * err = - ENOMEM ;
150150 mutex_unlock (& sbi -> s_alloc_mutex );
151151 return NULL ;
152152 }
153153 if (UDF_QUERY_FLAG (inode -> i_sb , UDF_FLAG_USE_AD_IN_ICB ))
154- UDF_I_ALLOCTYPE (inode ) = ICBTAG_FLAG_AD_IN_ICB ;
154+ UDF_I (inode )-> i_alloc_type = ICBTAG_FLAG_AD_IN_ICB ;
155155 else if (UDF_QUERY_FLAG (inode -> i_sb , UDF_FLAG_USE_SHORT_AD ))
156- UDF_I_ALLOCTYPE (inode ) = ICBTAG_FLAG_AD_SHORT ;
156+ UDF_I (inode )-> i_alloc_type = ICBTAG_FLAG_AD_SHORT ;
157157 else
158- UDF_I_ALLOCTYPE (inode ) = ICBTAG_FLAG_AD_LONG ;
158+ UDF_I (inode )-> i_alloc_type = ICBTAG_FLAG_AD_LONG ;
159159 inode -> i_mtime = inode -> i_atime = inode -> i_ctime =
160- UDF_I_CRTIME (inode ) = current_fs_time (inode -> i_sb );
160+ UDF_I (inode )-> i_crtime = current_fs_time (inode -> i_sb );
161161 insert_inode_hash (inode );
162162 mark_inode_dirty (inode );
163163 mutex_unlock (& sbi -> s_alloc_mutex );
0 commit comments