[PATCH] vfs: fix missing unlock on error in simple_xattr_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Add the missing unlock before return from function simple_xattr_list()
in the error handling case.

Fixes: 786534b92f3c (tmpfs: listxattr should include POSIX ACL xattrs)
Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
 fs/xattr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/xattr.c b/fs/xattr.c
index 07d0e47..d4f8487 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -964,8 +964,10 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
 			continue;
 
 		err = xattr_list_one(&buffer, &remaining_size, xattr->name);
-		if (err)
+		if (err) {
+			spin_unlock(&xattrs->lock);
 			return err;
+		}
 	}
 	spin_unlock(&xattrs->lock);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux