[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 10/21: ext2fs: fix block reference
From: |
Samuel Thibault |
Subject: |
[hurd] 10/21: ext2fs: fix block reference |
Date: |
Sat, 04 Mar 2017 21:10:58 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 41857c776d63bfed4c14bd882b3c9eade1f52e4d
Author: Richard Braun <address@hidden>
Date: Fri Jan 6 20:44:04 2017 +0100
ext2fs: fix block reference
ext2fs/xattr.c (ext2_get_xattr): Keep the inode reference until the
block reference is done.
---
ext2fs/xattr.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
index 1366884..6507a97 100644
--- a/ext2fs/xattr.c
+++ b/ext2fs/xattr.c
@@ -582,7 +582,6 @@ ext2_get_xattr (struct node *np, const char *name, char
*value, size_t *len)
int err;
void *block;
struct ext2_inode *ei;
- block_t blkno;
struct ext2_xattr_header *header;
struct ext2_xattr_entry *entry;
@@ -601,15 +600,15 @@ ext2_get_xattr (struct node *np, const char *name, char
*value, size_t *len)
size = *len;
ei = dino_ref (np->cache_id);
- blkno = ei->i_file_acl;
- dino_deref (ei);
- if (blkno == 0)
+ if (ei->i_file_acl == 0)
{
+ dino_deref (ei);
return ENODATA;
}
- block = disk_cache_block_ref (blkno);
+ block = disk_cache_block_ref (ei->i_file_acl);
+ dino_deref (ei);
header = EXT2_XATTR_HEADER (block);
if (header->h_magic != EXT2_XATTR_BLOCK_MAGIC || header->h_blocks != 1)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (cef4f1d -> db7dd39), Samuel Thibault, 2017/03/04
- [hurd] 03/21: ext2fs: Fix typo., Samuel Thibault, 2017/03/04
- [hurd] 06/21: ext2fs: Do not read translator record on Linux filesystems., Samuel Thibault, 2017/03/04
- [hurd] 10/21: ext2fs: fix block reference,
Samuel Thibault <=
- [hurd] 16/21: libshouldbeinlibc: Fix NDEBUG build., Samuel Thibault, 2017/03/04
- [hurd] 08/21: ext2fs: Fix block allocation., Samuel Thibault, 2017/03/04
- [hurd] 12/21: ext2fs: fix extended attribute retrieval, Samuel Thibault, 2017/03/04
- [hurd] 11/21: ext2fs: minor cleanup, Samuel Thibault, 2017/03/04
- [hurd] 15/21: Fix mig URL, Samuel Thibault, 2017/03/04
- [hurd] 19/21: boot: Fix failing device lookups in unprivileged mode., Samuel Thibault, 2017/03/04
- [hurd] 09/21: ext2fs: Fix potential block leak., Samuel Thibault, 2017/03/04
- [hurd] 14/21: Merge remote-tracking branch 'remotes/darnassus/ext2fs-xattrs', Samuel Thibault, 2017/03/04
- [hurd] 05/21: ext2fs: Fix block leak in xattr code., Samuel Thibault, 2017/03/04
- [hurd] 21/21: Avoid ports_interrupt_rpcs cancel itself, Samuel Thibault, 2017/03/04