diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-08-30 13:04:47 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-09-05 20:50:21 +0300 |
commit | 11f5020d2f43a9a7b9b5cf22873e5a9a06a884f7 (patch) | |
tree | 555eefbf9072569052e41c1243d37a6317ee7539 /fs/f2fs/namei.c | |
parent | ee605234996627c4fe874ea580e36211fb2bf6d5 (diff) | |
download | linux-11f5020d2f43a9a7b9b5cf22873e5a9a06a884f7.tar.xz |
f2fs: update i_flags correctly
f2fs enables hash-indexed directory by default, so we need to tag
FS_INDEX_FL in inode::i_flags during directory creataion, in order
to show correct status of inode in lsattr:
Before:
------------------- /mnt/f2fs/dir/
After:
-----------I------- /mnt/f2fs/dir/
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r-- | fs/f2fs/namei.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index e241c1b2c636..a4dab98c4b7b 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -100,6 +100,9 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) F2FS_I(inode)->i_flags = f2fs_mask_flags(mode, F2FS_I(dir)->i_flags & F2FS_FL_INHERITED); + if (S_ISDIR(inode->i_mode)) + F2FS_I(inode)->i_flags |= FS_INDEX_FL; + if (F2FS_I(inode)->i_flags & FS_PROJINHERIT_FL) set_inode_flag(inode, FI_PROJ_INHERIT); |