From: Andreas Gruenbacher <agruen@suse.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: Add extended attributes to ext2/3
Date: Tue, 15 Oct 2002 16:40:15 +0200 [thread overview]
Message-ID: <200210151640.15581.agruen@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
Hello,
Here are two fixes as incrementals to the xattr/acl patches:
fix-xattr.diff: The bad_block bug Andreas Dilger has reported
fix-acl.diff: Make change in ext[23]_new_inode() less intrusive.
[-- Attachment #2: fix-acl.diff --]
[-- Type: text/x-diff, Size: 1083 bytes --]
--- linux-2.4.19.old/fs/ext3/ialloc.c 2002-10-15 14:18:59.000000000 +0200
+++ linux-2.4.19.new/fs/ext3/ialloc.c 2002-10-15 14:16:34.000000000 +0200
@@ -510,7 +510,9 @@
inode->i_generation = sb->u.ext3_sb.s_next_generation++;
inode->u.ext3_i.i_state = EXT3_STATE_NEW;
-
+ err = ext3_mark_inode_dirty(handle, inode);
+ if (err) goto fail;
+
unlock_super (sb);
if(DQUOT_ALLOC_INODE(inode)) {
DQUOT_DROP(inode);
@@ -522,12 +524,6 @@
DQUOT_FREE_INODE(inode);
goto fail2;
}
- err = ext3_mark_inode_dirty(handle, inode);
- if (err) {
- DQUOT_FREE_INODE(inode);
- goto fail2;
- }
-
ext3_debug ("allocating inode %lu\n", inode->i_ino);
return inode;
diff -Nur --exclude='*.orig' linux-2.4.19.old/fs/ext2/ialloc.c linux-2.4.19.new/fs/ext2/ialloc.c
--- linux-2.4.19.old/fs/ext2/ialloc.c 2002-10-15 15:32:24.000000000 +0200
+++ linux-2.4.19.new/fs/ext2/ialloc.c 2002-10-15 15:32:16.000000000 +0200
@@ -410,7 +410,6 @@
DQUOT_FREE_INODE(inode);
goto fail3;
}
- mark_inode_dirty(inode);
ext2_debug ("allocating inode %lu\n", inode->i_ino);
return inode;
[-- Attachment #3: fix-xattr.diff --]
[-- Type: text/x-diff, Size: 1323 bytes --]
--- linux-2.4.19.old/fs/ext2/xattr.c 2002-10-15 13:57:44.000000000 +0200
+++ linux-2.4.19.new/fs/ext2/xattr.c 2002-10-15 13:59:57.000000000 +0200
@@ -587,6 +587,7 @@
struct ext2_xattr_header *header = NULL;
struct ext2_xattr_entry *here, *last;
unsigned int name_len;
+ int block = EXT2_I(inode)->i_file_acl;
int min_offs = sb->s_blocksize, not_found = 1, free, error;
char *end;
@@ -618,9 +619,8 @@
return -ERANGE;
ext2_xattr_lock();
- if (EXT2_I(inode)->i_file_acl) {
+ if (block) {
/* The inode already has an extended attribute block. */
- int block = EXT2_I(inode)->i_file_acl;
bh = sb_bread(sb, block);
error = -EIO;
--- linux-2.4.19.old/fs/ext3/xattr.c 2002-10-15 14:24:10.000000000 +0200
+++ linux-2.4.19.new/fs/ext3/xattr.c 2002-10-15 14:24:01.000000000 +0200
@@ -587,6 +587,7 @@
struct ext3_xattr_header *header = NULL;
struct ext3_xattr_entry *here, *last;
unsigned int name_len;
+ int block = EXT3_I(inode)->i_file_acl;
int min_offs = sb->s_blocksize, not_found = 1, free, error;
char *end;
@@ -618,10 +619,8 @@
return -ERANGE;
ext3_xattr_lock();
- if (EXT3_I(inode)->i_file_acl) {
+ if (block) {
/* The inode already has an extended attribute block. */
- int block = EXT3_I(inode)->i_file_acl;
-
bh = sb_bread(sb, block);
error = -EIO;
if (!bh)
next reply other threads:[~2002-10-15 14:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 14:40 Andreas Gruenbacher [this message]
2002-10-15 18:29 ` Add extended attributes to ext2/3 Theodore Ts'o
2002-10-15 21:00 ` Andreas Gruenbacher
2002-10-15 22:01 ` Andreas Dilger
2002-10-15 22:09 ` Andreas Gruenbacher
2002-10-15 22:18 ` Andreas Gruenbacher
2002-10-21 10:48 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200210151640.15581.agruen@suse.de \
--to=agruen@suse.de \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox