From: Andreas Gruenbacher <agruen@suse.de>
To: Jan Kara <jack@suse.cz>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: Ext2 xattr error handling
Date: Wed, 26 Jan 2005 14:24:28 +0100 [thread overview]
Message-ID: <1106745867.13004.20.camel@winden.suse.de> (raw)
In-Reply-To: <20050124112246.GA13560@atrey.karlin.mff.cuni.cz>
On Mon, 2005-01-24 at 12:22, Jan Kara wrote:
> Hi!
>
> I think there's a subtle bug in handling of errors when
> creating xattrs in ext2. In ext2_xattr_set2() if inode is marked for SYNC
> ext2_sync_inode() is called. It can fail and then the state of xattrs is
> inconsistent (actually it depends on the place at which the sync fails -
> if inode itself cannot be written then it's probably an IO error and we
> don't care to much but sync can fail also because of ENOSPC and in such
> case we should proceed more gracefully). The attached patch should fix
> that.
It should probably just do this, no?
Index: linux-2.6.11-latest/fs/ext2/xattr.c
===================================================================
--- linux-2.6.11-latest.orig/fs/ext2/xattr.c
+++ linux-2.6.11-latest/fs/ext2/xattr.c
@@ -705,7 +705,7 @@ ext2_xattr_set2(struct inode *inode, str
EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
inode->i_ctime = CURRENT_TIME_SEC;
if (IS_SYNC(inode)) {
- error = ext2_sync_inode (inode);
+ error = ext2_write_inode(inode, 1);
if (error)
goto cleanup;
} else
Cheers,
--
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX GMBH
prev parent reply other threads:[~2005-01-26 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 11:22 Ext2 xattr error handling Jan Kara
2005-01-26 13:24 ` Andreas Gruenbacher [this message]
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=1106745867.13004.20.camel@winden.suse.de \
--to=agruen@suse.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).