summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/journal.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-12 16:30:12 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-14 12:46:20 +0300
commitc78c7e35a4709b55d3126624662c8f6d7e3d1a5e (patch)
treef36f56651f50f51b7e79451d0986e3656da0269d /fs/ubifs/journal.c
parent720b499c806200d06f4f22c668d46db784117089 (diff)
UBIFS: xattr bugfixes
Xattr code has not been tested for a while and there were serveral bugs. One of them is using wrong inode in 'ubifs_jnl_change_xattr()'. The other is a deadlock in 'ubifs_setxattr()': the i_mutex is locked in 'cap_inode_need_killpriv()' path, so deadlock happens when 'ubifs_setxattr()' tries to lock it again. Thanks to Zoltan Sogor for finding these bugs. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/journal.c')
-rw-r--r--fs/ubifs/journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index acdae00aaa5..22993f867d1 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -1374,7 +1374,7 @@ int ubifs_jnl_change_xattr(struct ubifs_info *c, const struct inode *inode,
const struct inode *host)
{
int err, len1, len2, aligned_len, aligned_len1, lnum, offs;
- struct ubifs_inode *host_ui = ubifs_inode(inode);
+ struct ubifs_inode *host_ui = ubifs_inode(host);
struct ubifs_ino_node *ino;
union ubifs_key key;
int sync = IS_DIRSYNC(host);