mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:11:14 -04:00
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:
parent
984e2d89fa
commit
3a5c8ed67c
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue