fixup! (CR): Instead of vfs_write with kernel_write

Change-Id: I4f2fe321106ee4f588b21d308f78676feca338cb
Reviewed-on: https://gerrit.mot.com/1732833
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
xiaoy3 2020-08-25 20:57:34 +08:00 • committed by Yang Xiao
commit 3a5c8ed67c

View file

@ -1146,7 +1146,11 @@ static int store_utags(struct ctrl *ctrl, struct utag *tags)
}
fp = cb->filep;
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
written = kernel_write(fp, datap, tags_size, &pos);
#else
written = vfs_write(fp, datap, tags_size, &pos);
#endif
if (written < tags_size) {
pr_err("failed to write file (%s), rc=%zu\n",
cb->name, written);
@ -1161,7 +1165,11 @@ static int store_utags(struct ctrl *ctrl, struct utag *tags)
fp = cb->filep;
pos = 0;
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
written = kernel_write(fp, datap, tags_size, &pos);
#else
written = vfs_write(fp, datap, tags_size, &pos);
#endif
if (written < tags_size)
pr_err("failed to write file (%s), rc=%zu\n",
cb->name, written);