diff options
author | Liu Song <liu.song11@zte.com.cn> | 2021-01-31 13:26:05 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-02-01 23:32:51 +0100 |
commit | 2e0cd472a0dd9b9a35699502570015af15d7c70f (patch) | |
tree | 2d631d2653d81a99261916119db6bd031b8ce7c8 /fs/f2fs | |
parent | f2fs: fix to avoid inconsistent quota data (diff) | |
download | linux-2e0cd472a0dd9b9a35699502570015af15d7c70f.tar.xz linux-2e0cd472a0dd9b9a35699502570015af15d7c70f.zip |
f2fs: remove unnecessary initialization in xattr.c
These variables will be explicitly assigned before use,
so there is no need to initialize.
Signed-off-by: Liu Song <liu.song11@zte.com.cn>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/xattr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 2086bef6c154..8159fae74b9a 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -327,7 +327,7 @@ static int lookup_all_xattrs(struct inode *inode, struct page *ipage, void *last_addr = NULL; nid_t xnid = F2FS_I(inode)->i_xattr_nid; unsigned int inline_size = inline_xattr_size(inode); - int err = 0; + int err; if (!xnid && !inline_size) return -ENODATA; @@ -515,7 +515,7 @@ int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) { struct f2fs_xattr_entry *entry = NULL; - int error = 0; + int error; unsigned int size, len; void *base_addr = NULL; int base_size; @@ -562,7 +562,7 @@ ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) struct inode *inode = d_inode(dentry); struct f2fs_xattr_entry *entry; void *base_addr, *last_base_addr; - int error = 0; + int error; size_t rest = buffer_size; down_read(&F2FS_I(inode)->i_xattr_sem); @@ -632,7 +632,7 @@ static int __f2fs_setxattr(struct inode *inode, int index, int found, newsize; size_t len; __u32 new_hsize; - int error = 0; + int error; if (name == NULL) return -EINVAL; |