aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/xattr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 1f546b4b6b61..8bea941ee309 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -156,10 +156,6 @@ static int f2fs_xattr_advise_set(struct dentry *dentry, const char *name,
156} 156}
157 157
158#ifdef CONFIG_F2FS_FS_SECURITY 158#ifdef CONFIG_F2FS_FS_SECURITY
159static int __f2fs_setxattr(struct inode *inode, int index,
160 const char *name, const void *value, size_t size,
161 struct page *ipage, int);
162
163static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array, 159static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array,
164 void *page) 160 void *page)
165{ 161{
@@ -167,7 +163,7 @@ static int f2fs_initxattrs(struct inode *inode, const struct xattr *xattr_array,
167 int err = 0; 163 int err = 0;
168 164
169 for (xattr = xattr_array; xattr->name != NULL; xattr++) { 165 for (xattr = xattr_array; xattr->name != NULL; xattr++) {
170 err = __f2fs_setxattr(inode, F2FS_XATTR_INDEX_SECURITY, 166 err = f2fs_setxattr(inode, F2FS_XATTR_INDEX_SECURITY,
171 xattr->name, xattr->value, 167 xattr->name, xattr->value,
172 xattr->value_len, (struct page *)page, 0); 168 xattr->value_len, (struct page *)page, 0);
173 if (err < 0) 169 if (err < 0)
@@ -603,6 +599,10 @@ int f2fs_setxattr(struct inode *inode, int index, const char *name,
603 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); 599 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
604 int err; 600 int err;
605 601
602 /* this case is only from init_inode_metadata */
603 if (ipage)
604 return __f2fs_setxattr(inode, index, name, value,
605 size, ipage, flags);
606 f2fs_balance_fs(sbi); 606 f2fs_balance_fs(sbi);
607 607
608 f2fs_lock_op(sbi); 608 f2fs_lock_op(sbi);