aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index d884989cc83d..dfe3b9bafc0d 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -995,12 +995,11 @@ void ext4_show_inline_dir(struct inode *dir, struct buffer_head *bh,
995 */ 995 */
996static int ext4_add_dirent_to_inline(handle_t *handle, 996static int ext4_add_dirent_to_inline(handle_t *handle,
997 struct ext4_filename *fname, 997 struct ext4_filename *fname,
998 struct dentry *dentry, 998 struct inode *dir,
999 struct inode *inode, 999 struct inode *inode,
1000 struct ext4_iloc *iloc, 1000 struct ext4_iloc *iloc,
1001 void *inline_start, int inline_size) 1001 void *inline_start, int inline_size)
1002{ 1002{
1003 struct inode *dir = d_inode(dentry->d_parent);
1004 int err; 1003 int err;
1005 struct ext4_dir_entry_2 *de; 1004 struct ext4_dir_entry_2 *de;
1006 1005
@@ -1245,12 +1244,11 @@ out:
1245 * the new created block. 1244 * the new created block.
1246 */ 1245 */
1247int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname, 1246int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname,
1248 struct dentry *dentry, struct inode *inode) 1247 struct inode *dir, struct inode *inode)
1249{ 1248{
1250 int ret, inline_size; 1249 int ret, inline_size;
1251 void *inline_start; 1250 void *inline_start;
1252 struct ext4_iloc iloc; 1251 struct ext4_iloc iloc;
1253 struct inode *dir = d_inode(dentry->d_parent);
1254 1252
1255 ret = ext4_get_inode_loc(dir, &iloc); 1253 ret = ext4_get_inode_loc(dir, &iloc);
1256 if (ret) 1254 if (ret)
@@ -1264,7 +1262,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname,
1264 EXT4_INLINE_DOTDOT_SIZE; 1262 EXT4_INLINE_DOTDOT_SIZE;
1265 inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE; 1263 inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE;
1266 1264
1267 ret = ext4_add_dirent_to_inline(handle, fname, dentry, inode, &iloc, 1265 ret = ext4_add_dirent_to_inline(handle, fname, dir, inode, &iloc,
1268 inline_start, inline_size); 1266 inline_start, inline_size);
1269 if (ret != -ENOSPC) 1267 if (ret != -ENOSPC)
1270 goto out; 1268 goto out;
@@ -1285,7 +1283,7 @@ int ext4_try_add_inline_entry(handle_t *handle, struct ext4_filename *fname,
1285 if (inline_size) { 1283 if (inline_size) {
1286 inline_start = ext4_get_inline_xattr_pos(dir, &iloc); 1284 inline_start = ext4_get_inline_xattr_pos(dir, &iloc);
1287 1285
1288 ret = ext4_add_dirent_to_inline(handle, fname, dentry, 1286 ret = ext4_add_dirent_to_inline(handle, fname, dir,
1289 inode, &iloc, inline_start, 1287 inode, &iloc, inline_start,
1290 inline_size); 1288 inline_size);
1291 1289