summaryrefslogtreecommitdiff
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2012-12-10 23:06:01 +0400
committerTheodore Ts'o <tytso@mit.edu>2012-12-10 23:06:01 +0400
commit61f86638d8a656101bb0f9c41c55d9685f8a2357 (patch)
tree0fae5bd89012c2d2d8a74cb79b67fea56b4f76d9 /fs/ext4/namei.c
parent9f40fe54635b7533f51993d0f5e7f014fc14d33a (diff)
downloadlinux-61f86638d8a656101bb0f9c41c55d9685f8a2357.tar.xz
ext4: let empty_dir handle inline dir
empty_dir is used when deleting a dir. So it should handle inline dir properly. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r--fs/ext4/namei.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index a32228a73df0..e3e20d0aa299 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2464,6 +2464,14 @@ static int empty_dir(struct inode *inode)
struct super_block *sb;
int err = 0;
+ if (ext4_has_inline_data(inode)) {
+ int has_inline_data = 1;
+
+ err = empty_inline_dir(inode, &has_inline_data);
+ if (has_inline_data)
+ return err;
+ }
+
sb = inode->i_sb;
if (inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2) ||
!(bh = ext4_bread(NULL, inode, 0, 0, &err))) {