diff options
| author | Kaho Ng <ngkaho1234@gmail.com> | 2016-05-16 01:49:26 +0800 |
|---|---|---|
| committer | Kaho Ng <ngkaho1234@gmail.com> | 2016-05-16 01:50:35 +0800 |
| commit | 1cf71b8e4ad525d575ae130a658b02f67f5cc495 (patch) | |
| tree | 85018eb0c2da03e0ca63c8489a13f8c3c339838e /src | |
| parent | 9fdd0b708e0068d6c0be75b7e3df7bbdb7d1d236 (diff) | |
ext4_xattr: invalidate the block buffer when writing fails
Diffstat (limited to 'src')
| -rw-r--r-- | src/ext4_xattr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ext4_xattr.c b/src/ext4_xattr.c index 7a7dcf4..ca6a947 100644 --- a/src/ext4_xattr.c +++ b/src/ext4_xattr.c @@ -1001,8 +1001,11 @@ int ext4_fs_get_xattr_ref(struct ext4_fs *fs, struct ext4_inode_ref *inode_ref, void ext4_fs_put_xattr_ref(struct ext4_xattr_ref *ref) { - ext4_xattr_write_to_disk(ref); + int rc = ext4_xattr_write_to_disk(ref); if (ref->block_loaded) { + if (rc != EOK) + ext4_bcache_clear_dirty(ref->block.buf); + ext4_block_set(ref->fs->bdev, &ref->block); ref->block_loaded = false; } |
