vfs: delete unnecessary assignment in vfs_listxattr
authorChengguang Xu <cgxu519@gmx.com>
Wed, 16 May 2018 05:34:52 +0000 (13:34 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 29 May 2018 17:22:41 +0000 (13:22 -0400)
It seems the first error assignment in if branch is redundant.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/xattr.c

index 28e1dfc27b95748c835c8f74129ef1a85b78a466..f9cb1db187b740b9b7ef8cd19be9cdb6155d9300 100644 (file)
@@ -353,7 +353,6 @@ vfs_listxattr(struct dentry *dentry, char *list, size_t size)
        if (error)
                return error;
        if (inode->i_op->listxattr && (inode->i_opflags & IOP_XATTR)) {
        if (error)
                return error;
        if (inode->i_op->listxattr && (inode->i_opflags & IOP_XATTR)) {
-               error = -EOPNOTSUPP;
                error = inode->i_op->listxattr(dentry, list, size);
        } else {
                error = security_inode_listsecurity(inode, list, size);
                error = inode->i_op->listxattr(dentry, list, size);
        } else {
                error = security_inode_listsecurity(inode, list, size);