| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
|---|
| 2 | 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * CREDITS: |
|---|
| 9 | 10 | * Lots of code in this file is copy from linux/fs/ext3/xattr.c. |
|---|
| 10 | 11 | * Copyright (C) 2001-2003 Andreas Gruenbacher, <agruen@suse.de> |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or |
|---|
| 13 | | - * modify it under the terms of the GNU General Public |
|---|
| 14 | | - * License version 2 as published by the Free Software Foundation. |
|---|
| 15 | | - * |
|---|
| 16 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 19 | | - * General Public License for more details. |
|---|
| 20 | 12 | */ |
|---|
| 21 | 13 | |
|---|
| 22 | 14 | #include <linux/capability.h> |
|---|
| .. | .. |
|---|
| 1219 | 1211 | struct ocfs2_xattr_value_root *xv; |
|---|
| 1220 | 1212 | size_t size; |
|---|
| 1221 | 1213 | int ret = -ENODATA, name_offset, name_len, i; |
|---|
| 1222 | | - int uninitialized_var(block_off); |
|---|
| 1214 | + int block_off; |
|---|
| 1223 | 1215 | |
|---|
| 1224 | 1216 | xs->bucket = ocfs2_xattr_bucket_new(inode); |
|---|
| 1225 | 1217 | if (!xs->bucket) { |
|---|
| .. | .. |
|---|
| 7250 | 7242 | */ |
|---|
| 7251 | 7243 | static int ocfs2_xattr_security_get(const struct xattr_handler *handler, |
|---|
| 7252 | 7244 | struct dentry *unused, struct inode *inode, |
|---|
| 7253 | | - const char *name, void *buffer, size_t size) |
|---|
| 7245 | + const char *name, void *buffer, size_t size, |
|---|
| 7246 | + int flags) |
|---|
| 7254 | 7247 | { |
|---|
| 7255 | 7248 | return ocfs2_xattr_get(inode, OCFS2_XATTR_INDEX_SECURITY, |
|---|
| 7256 | 7249 | name, buffer, size); |
|---|
| .. | .. |
|---|
| 7322 | 7315 | */ |
|---|
| 7323 | 7316 | static int ocfs2_xattr_trusted_get(const struct xattr_handler *handler, |
|---|
| 7324 | 7317 | struct dentry *unused, struct inode *inode, |
|---|
| 7325 | | - const char *name, void *buffer, size_t size) |
|---|
| 7318 | + const char *name, void *buffer, size_t size, |
|---|
| 7319 | + int flags) |
|---|
| 7326 | 7320 | { |
|---|
| 7327 | 7321 | return ocfs2_xattr_get(inode, OCFS2_XATTR_INDEX_TRUSTED, |
|---|
| 7328 | 7322 | name, buffer, size); |
|---|
| .. | .. |
|---|
| 7348 | 7342 | */ |
|---|
| 7349 | 7343 | static int ocfs2_xattr_user_get(const struct xattr_handler *handler, |
|---|
| 7350 | 7344 | struct dentry *unused, struct inode *inode, |
|---|
| 7351 | | - const char *name, void *buffer, size_t size) |
|---|
| 7345 | + const char *name, void *buffer, size_t size, |
|---|
| 7346 | + int flags) |
|---|
| 7352 | 7347 | { |
|---|
| 7353 | 7348 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
|---|
| 7354 | 7349 | |
|---|