aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/journal.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-12 09:30:12 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-14 05:46:20 -0400
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 acdae00aaa54..22993f867d19 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,
1374 const struct inode *host) 1374 const struct inode *host)
1375{ 1375{
1376 int err, len1, len2, aligned_len, aligned_len1, lnum, offs; 1376 int err, len1, len2, aligned_len, aligned_len1, lnum, offs;
1377 struct ubifs_inode *host_ui = ubifs_inode(inode); 1377 struct ubifs_inode *host_ui = ubifs_inode(host);
1378 struct ubifs_ino_node *ino; 1378 struct ubifs_ino_node *ino;
1379 union ubifs_key key; 1379 union ubifs_key key;
1380 int sync = IS_DIRSYNC(host); 1380 int sync = IS_DIRSYNC(host);