* ext3_xattr_set()
*
* Create, replace or remove an extended attribute for this inode. Buffer
-@@ -583,6 +1067,100 @@ static void ext3_xattr_update_super_bloc
+@@ -583,6 +1067,101 @@ static void ext3_xattr_update_super_bloc
*/
int
ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+
* ext3_xattr_set()
*
* Create, replace or remove an extended attribute for this inode. Buffer
-@@ -566,6 +1050,100 @@ static void ext3_xattr_update_super_bloc
+@@ -566,6 +1050,101 @@ static void ext3_xattr_update_super_bloc
*/
int
ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+
/*
* If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
* not set, set it.
-@@ -480,6 +691,101 @@
+@@ -480,6 +691,102 @@
*/
int
ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+
/*
* If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
* not set, set it.
-@@ -480,6 +691,101 @@
+@@ -480,6 +691,102 @@
*/
int
ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+
* ext3_xattr_set()
*
* Create, replace or remove an extended attribute for this inode. Buffer
-@@ -566,6 +1050,100 @@ static void ext3_xattr_update_super_bloc
+@@ -566,6 +1050,101 @@ static void ext3_xattr_update_super_bloc
*/
int
ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+
* ext3_xattr_set_handle()
*
* Create, replace or remove an extended attribute for this inode. Buffer
-@@ -470,6 +959,103 @@
+@@ -470,6 +959,104 @@
*/
int
ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
+ if (err != 0 && err != -ENOENT) {
+ /* not found EA in block */
+ goto finish;
++ } else if (err == 0) {
++ /* found EA in block */
++ where = 1;
++ found = 1;
+ }
-+ /* found EA in block */
-+ where = 1;
-+ found = 1;
+ } else
+ goto finish;
+