UPSTREAM: PCI: rockchip: Mark RC as common clock architecture
[firefly-linux-kernel-4.4.55.git] / fs / ubifs / xattr.c
index 259fbabf143d8cb8cf4e88df59268710fd420137..b5bf23b34241820a3c26551baa5f97062b8d76b8 100644 (file)
@@ -173,6 +173,7 @@ out_cancel:
        host_ui->xattr_cnt -= 1;
        host_ui->xattr_size -= CALC_DENT_SIZE(nm->len);
        host_ui->xattr_size -= CALC_XATTR_BYTES(size);
+       host_ui->xattr_names -= nm->len;
        mutex_unlock(&host_ui->ui_mutex);
 out_free:
        make_bad_inode(inode);
@@ -533,6 +534,7 @@ out_cancel:
        host_ui->xattr_cnt += 1;
        host_ui->xattr_size += CALC_DENT_SIZE(nm->len);
        host_ui->xattr_size += CALC_XATTR_BYTES(ui->data_len);
+       host_ui->xattr_names += nm->len;
        mutex_unlock(&host_ui->ui_mutex);
        ubifs_release_budget(c, &req);
        make_bad_inode(inode);
@@ -588,46 +590,6 @@ out_free:
        return err;
 }
 
-static size_t security_listxattr(struct dentry *d, char *list, size_t list_size,
-                                const char *name, size_t name_len, int flags)
-{
-       const int prefix_len = XATTR_SECURITY_PREFIX_LEN;
-       const size_t total_len = prefix_len + name_len + 1;
-
-       if (list && total_len <= list_size) {
-               memcpy(list, XATTR_SECURITY_PREFIX, prefix_len);
-               memcpy(list + prefix_len, name, name_len);
-               list[prefix_len + name_len] = '\0';
-       }
-
-       return total_len;
-}
-
-static int security_getxattr(struct dentry *d, const char *name, void *buffer,
-                     size_t size, int flags)
-{
-       return ubifs_getxattr(d, name, buffer, size);
-}
-
-static int security_setxattr(struct dentry *d, const char *name,
-                            const void *value, size_t size, int flags,
-                            int handler_flags)
-{
-       return ubifs_setxattr(d, name, value, size, flags);
-}
-
-static const struct xattr_handler ubifs_xattr_security_handler = {
-       .prefix = XATTR_SECURITY_PREFIX,
-       .list   = security_listxattr,
-       .get    = security_getxattr,
-       .set    = security_setxattr,
-};
-
-const struct xattr_handler *ubifs_xattr_handlers[] = {
-       &ubifs_xattr_security_handler,
-       NULL,
-};
-
 static int init_xattrs(struct inode *inode, const struct xattr *xattr_array,
                      void *fs_info)
 {