diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-07-22 18:03:50 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 07:57:11 -0700 |
commit | 7975f3498dc0403d8177c0775b9514158ec66681 (patch) | |
tree | a2852ce6094778eff567b1ebeeab95315003c0f3 /fs/f2fs/inline.c | |
parent | 04f9287ab395a5a279db44fb39de69b23640abb9 (diff) | |
download | lwn-7975f3498dc0403d8177c0775b9514158ec66681.tar.gz lwn-7975f3498dc0403d8177c0775b9514158ec66681.zip |
f2fs: support fiemap() for directory inode
Adjust f2fs_fiemap() to support fiemap() on directory inode.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 3613efca8c00..8c0712154fb1 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -704,7 +704,13 @@ int f2fs_inline_data_fiemap(struct inode *inode, if (IS_ERR(ipage)) return PTR_ERR(ipage); - if (!f2fs_has_inline_data(inode)) { + if ((S_ISREG(inode->i_mode) || S_ISLNK(inode->i_mode)) && + !f2fs_has_inline_data(inode)) { + err = -EAGAIN; + goto out; + } + + if (S_ISDIR(inode->i_mode) && !f2fs_has_inline_dentry(inode)) { err = -EAGAIN; goto out; } |