summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-03-31 00:23:45 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2015-04-11 00:08:58 +0200
commitcb58463bc94470c428f3b9f4cda748e7755218ca (patch)
treec8873a5014108284c0354e34d767697366cbeb9f /fs/f2fs/dir.c
parentf2fs: add F2FS_INLINE_DOTS to recover missing dot dentries (diff)
downloadlinux-cb58463bc94470c428f3b9f4cda748e7755218ca.tar.xz
linux-cb58463bc94470c428f3b9f4cda748e7755218ca.zip
f2fs: assign parent's i_mode for empty dir
When assigning i_mode for dotdot, it needs to assign parent's i_mode. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r--fs/f2fs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 906b5876dc27..3a3302ab7871 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -334,7 +334,7 @@ void do_make_empty_dir(struct inode *inode, struct inode *parent,
de->name_len = cpu_to_le16(2);
de->ino = cpu_to_le32(parent->i_ino);
memcpy(d->filename[1], "..", 2);
- set_de_type(de, inode->i_mode);
+ set_de_type(de, parent->i_mode);
test_and_set_bit_le(0, (void *)d->bitmap);
test_and_set_bit_le(1, (void *)d->bitmap);