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>
This commit is contained in:
Chao Yu
2019-07-22 17:57:05 +08:00
committed by Jaegeuk Kim
parent 7975f3498d
commit 955ebcd3a9
3 changed files with 20 additions and 0 deletions

View File

@@ -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;