Whamcloud - gitweb
libext2fs: don't fail inline data operations if there's no EA
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 10 Aug 2014 22:31:04 +0000 (18:31 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 2014 22:31:04 +0000 (18:31 -0400)
commit996999a1a45e1d36ff0e24925ee02fca87ad8283
tree7612195a0d9cc1eea94de056fcfc5b722443dec1
parentcffe0221eb53c2de739f483aeb368684206ad4a8
libext2fs: don't fail inline data operations if there's no EA

Fix up the rest of the inline data code not to complain if there's no
EA, since it's possible that there's no EA because we're in the
process of creating an inline data file.  Also, don't return an error
code when removing a nonexistent EA, because there's no reason to.

Furthermore, if we write less than 60 bytes of inline data, remove the
EA to avoid wasting space.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext_attr.c
lib/ext2fs/inline_data.c
tests/d_xattr_edits/expect