Skip to contentSkip to conversation

ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

PATCH Applied piaojun 3 participants 3 messages Jan 11, 2018 OCFS2

lore
Share & tools
lore

piaojun

author
#0 lore raw

PATCH 1/1 ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

We need catch the errno returned by ocfs2_xattr_get_nolock() and assign it to 'ret' for printing and noticing upper callers.

---
 fs/ocfs2/xattr.c | 1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/xattr.c +1 -0
index 5fdf269..439f567 100644
@@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
 			if (S_ISDIR(mode))
 				a_size <<= 1;
 		} else if (acl_len != 0 && acl_len != -ENODATA) {
+			ret = acl_len;
 			mlog_errno(ret);
 			return ret;
 		}
#1 lore raw

PATCH 1/1 ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

Looks good.

Quoted 7 lines
Quoted 1 line
Quoted 1 line

We need catch the errno returned by ocfs2_xattr_get_nolock() and assign it to 'ret' for printing and noticing upper callers.

Quoted 22 lines
---
 fs/ocfs2/xattr.c | 1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/xattr.c +1 -0
index 5fdf269..439f567 100644
@@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
 			if (S_ISDIR(mode))
 				a_size <<= 1;
 		} else if (acl_len != 0 && acl_len != -ENODATA) {
+			ret = acl_len;
 			mlog_errno(ret);
 			return ret;
 		}
Signature · 4 lines
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com 
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
#2 lore raw

PATCH 1/1 ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

In reply to piaojun
Quoted 23 lines · piaojun

We need catch the errno returned by ocfs2_xattr_get_nolock() and assign it to 'ret' for printing and noticing upper callers.

---
  fs/ocfs2/xattr.c | 1 +
  1 file changed, 1 insertion(+)
fs/ocfs2/xattr.c +1 -0
index 5fdf269..439f567 100644
@@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
  			if (S_ISDIR(mode))
  				a_size <<= 1;
  		} else if (acl_len != 0 && acl_len != -ENODATA) {
+			ret = acl_len;
  			mlog_errno(ret);
  			return ret;
  		}