summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/xattr.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-07-12 13:01:57 +0200
committerRichard Weinberger <richard@nod.at>2018-08-15 00:25:21 +0200
commit6eb61d587f4515e4be5669eff383c0185009954f (patch)
treea5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/xattr.c
parent54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff)
downloadlinux-6eb61d587f4515e4be5669eff383c0185009954f.tar.bz2
ubifs: Pass struct ubifs_info to ubifs_assert()
This allows us to have more context in ubifs_assert() and take different actions depending on the configuration. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/xattr.c')
-rw-r--r--fs/ubifs/xattr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 09e37e63bddd..61afdfee4b28 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -223,7 +223,7 @@ static int change_xattr(struct ubifs_info *c, struct inode *host,
struct ubifs_budget_req req = { .dirtied_ino = 2,
.dirtied_ino_d = ALIGN(size, 8) + ALIGN(host_ui->data_len, 8) };
- ubifs_assert(ui->data_len == inode->i_size);
+ ubifs_assert(c, ui->data_len == inode->i_size);
err = ubifs_budget_space(c, &req);
if (err)
return err;
@@ -305,7 +305,7 @@ int ubifs_xattr_set(struct inode *host, const char *name, const void *value,
int err;
if (check_lock)
- ubifs_assert(inode_is_locked(host));
+ ubifs_assert(c, inode_is_locked(host));
if (size > UBIFS_MAX_INO_DATA)
return -ERANGE;
@@ -388,8 +388,8 @@ ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
}
ui = ubifs_inode(inode);
- ubifs_assert(inode->i_size == ui->data_len);
- ubifs_assert(ubifs_inode(host)->xattr_size > ui->data_len);
+ ubifs_assert(c, inode->i_size == ui->data_len);
+ ubifs_assert(c, ubifs_inode(host)->xattr_size > ui->data_len);
mutex_lock(&ui->ui_mutex);
if (buf) {
@@ -476,7 +476,7 @@ ssize_t ubifs_listxattr(struct dentry *dentry, char *buffer, size_t size)
return err;
}
- ubifs_assert(written <= size);
+ ubifs_assert(c, written <= size);
return written;
}
@@ -489,7 +489,7 @@ static int remove_xattr(struct ubifs_info *c, struct inode *host,
struct ubifs_budget_req req = { .dirtied_ino = 2, .mod_dent = 1,
.dirtied_ino_d = ALIGN(host_ui->data_len, 8) };
- ubifs_assert(ui->data_len == inode->i_size);
+ ubifs_assert(c, ui->data_len == inode->i_size);
err = ubifs_budget_space(c, &req);
if (err)
@@ -559,7 +559,7 @@ static int ubifs_xattr_remove(struct inode *host, const char *name)
union ubifs_key key;
int err;
- ubifs_assert(inode_is_locked(host));
+ ubifs_assert(c, inode_is_locked(host));
if (!host->i_nlink)
return -ENOENT;
@@ -585,7 +585,7 @@ static int ubifs_xattr_remove(struct inode *host, const char *name)
goto out_free;
}
- ubifs_assert(inode->i_nlink == 1);
+ ubifs_assert(c, inode->i_nlink == 1);
clear_nlink(inode);
err = remove_xattr(c, host, inode, &nm);
if (err)