From: Jaegeuk Kim Date: Mon, 30 Mar 2015 22:23:45 +0000 (-0700) Subject: f2fs: assign parent's i_mode for empty dir X-Git-Tag: v4.14-rc1~5551^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb58463bc94470c428f3b9f4cda748e7755218ca;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 906b587..3a3302a 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);