diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-07-22 17:57:05 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 07:57:11 -0700 |
commit | 955ebcd3a910b00de94be8797b20b8cfb2ee0fd8 (patch) | |
tree | 6ba43907487a20abbd5d2047acac98da78834185 /fs/f2fs/xattr.c | |
parent | 7975f3498dc0403d8177c0775b9514158ec66681 (diff) | |
download | linux-955ebcd3a910b00de94be8797b20b8cfb2ee0fd8.tar.bz2 |
f2fs: fix to spread f2fs_is_checkpoint_ready()
We missed to call f2fs_is_checkpoint_ready() in several places, it may
allow space allocation even when free space was exhausted during
checkpoint is disabled, fix to add them.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index b32c45621679..3c92f4122044 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -21,6 +21,7 @@ #include <linux/posix_acl_xattr.h> #include "f2fs.h" #include "xattr.h" +#include "segment.h" static int f2fs_xattr_generic_get(const struct xattr_handler *handler, struct dentry *unused, struct inode *inode, @@ -729,6 +730,10 @@ int f2fs_setxattr(struct inode *inode, int index, const char *name, struct f2fs_sb_info *sbi = F2FS_I_SB(inode); int err; + err = f2fs_is_checkpoint_ready(sbi); + if (err) + return err; + err = dquot_initialize(inode); if (err) return err; |