From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/1] xfs: fix the symbolic link assert in xfs_ifree
Date: Fri, 07 Jun 2013 09:05:51 -0500 [thread overview]
Message-ID: <51B1E8BF.4070306@sgi.com> (raw)
In-Reply-To: <20130607010615.GH29338@dastard>
On 06/06/13 20:06, Dave Chinner wrote:
> On Thu, Jun 06, 2013 at 11:10:33AM -0500, Mark Tinguely wrote:
>> Adding an extended attribute to a symbolic link can force that
>> link to an remote extent. xfs_inactive() incorrectly assumes
>> that any symbolic link small enough to be in the inode core
>> is incore, the remote extent is not cleaned and xfs_ifree()
>> asserts on presence the remote extent.
>>
>> Signed-off-by: Mark Tinguely<tinguely@sgi.com>
>> ---
>> fs/xfs/xfs_vnodeops.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: b/fs/xfs/xfs_vnodeops.c
>> ===================================================================
>> --- a/fs/xfs/xfs_vnodeops.c
>> +++ b/fs/xfs/xfs_vnodeops.c
>> @@ -325,7 +325,7 @@ xfs_inactive(
>> /*
>> * Zero length symlinks _can_ exist.
>> */
>> - if (ip->i_d.di_size> XFS_IFORK_DSIZE(ip)) {
>> + if (ip->i_d.di_nextents) {
>> error = xfs_inactive_symlink_rmt(ip,&tp);
>> if (error)
>> goto out_cancel;
>
> This should match the check done in xfs_readlink. i.e. it should
> check against the fork format being in local or extent form, not
> check against the inode size.
>
> Also, I think that this symlink specific code should be factored out
> of xfs_inactive() and moved to fs/xfs/xfs_symlink.c as
> xfs_symlink_truncate() so that all the intricacies of the symlink
> truncation are in the one place. This would make
> xfs_symlink_truncate() look very similar to xfs_readlink()...
>
Sounds good.
--Mark.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-06-07 14:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 16:10 [PATCH 0/1] xfs: xfs_inactive fails to cleanup symlinks with attributes Mark Tinguely
2013-06-06 16:10 ` [PATCH 1/1] xfs: fix the symbolic link assert in xfs_ifree Mark Tinguely
2013-06-07 1:06 ` Dave Chinner
2013-06-07 14:05 ` Mark Tinguely [this message]
2013-06-06 19:17 ` [PATCH 0/1] xfs: xfs_inactive fails to cleanup symlinks with attributes Mark Tinguely
2013-06-06 21:13 ` Dave Chinner
2013-06-06 21:29 ` Mark Tinguely
2013-06-06 21:44 ` Eric Sandeen
2013-06-06 21:51 ` Dave Chinner
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=51B1E8BF.4070306@sgi.com \
--to=tinguely@sgi.com \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.