generic/4.0: the ubi patches has been fixed in the 3.19 patchset already
[15.05/openwrt.git] / target / linux / generic / patches-4.0 / 550-ubifs-symlink-xattr-support.patch
1 --- a/fs/ubifs/file.c
2 +++ b/fs/ubifs/file.c
3 @@ -1574,6 +1574,10 @@ const struct inode_operations ubifs_syml
4         .follow_link = ubifs_follow_link,
5         .setattr     = ubifs_setattr,
6         .getattr     = ubifs_getattr,
7 +       .setxattr    = ubifs_setxattr,
8 +       .getxattr    = ubifs_getxattr,
9 +       .listxattr   = ubifs_listxattr,
10 +       .removexattr = ubifs_removexattr,
11  };
12  
13  const struct file_operations ubifs_file_operations = {
14 --- a/fs/ubifs/xattr.c
15 +++ b/fs/ubifs/xattr.c
16 @@ -209,12 +209,12 @@ static int change_xattr(struct ubifs_inf
17                 goto out_free;
18         }
19         inode->i_size = ui->ui_size = size;
20 -       ui->data_len = size;
21  
22         mutex_lock(&host_ui->ui_mutex);
23         host->i_ctime = ubifs_current_time(host);
24         host_ui->xattr_size -= CALC_XATTR_BYTES(ui->data_len);
25         host_ui->xattr_size += CALC_XATTR_BYTES(size);
26 +       ui->data_len = size;
27  
28         /*
29          * It is important to write the host inode after the xattr inode