You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge 5.10.74 into android12-5.10-lts
Changes in 5.10.74 ext4: check and update i_disksize properly ext4: correct the error path of ext4_write_inline_data_end() ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS netfilter: ip6_tables: zero-initialize fragment offset HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs ASoC: SOF: loader: release_firmware() on load failure to avoid batching netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic netfilter: nf_nat_masquerade: defer conntrack walk to work queue mac80211: Drop frames from invalid MAC address in ad-hoc mode m68k: Handle arrivals of multiple signals correctly hwmon: (ltc2947) Properly handle errors when looking for the external clock net: prevent user from passing illegal stab size mac80211: check return value of rhashtable_init vboxfs: fix broken legacy mount signature checking net: sun: SUNVNET_COMMON should depend on INET drm/amdgpu: fix gart.bo pin_count leak scsi: ses: Fix unsigned comparison with less than zero scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported" perf/core: fix userpage->time_enabled of inactive events sched: Always inline is_percpu_thread() hwmon: (pmbus/ibm-cffps) max_power_out swap changes Linux 5.10.74 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ic5235aa8641c64ee2849355a7f10613ae204c74e
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 73
|
||||
SUBLEVEL = 74
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs)
|
||||
|
||||
if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) {
|
||||
fpu_version = sc->sc_fpstate[0];
|
||||
if (CPU_IS_020_OR_030 &&
|
||||
if (CPU_IS_020_OR_030 && !regs->stkadj &&
|
||||
regs->vector >= (VEC_FPBRUC * 4) &&
|
||||
regs->vector <= (VEC_FPNAN * 4)) {
|
||||
/* Clear pending exception in 68882 idle frame */
|
||||
@@ -510,7 +510,7 @@ static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *
|
||||
if (!(CPU_IS_060 || CPU_IS_COLDFIRE))
|
||||
context_size = fpstate[1];
|
||||
fpu_version = fpstate[0];
|
||||
if (CPU_IS_020_OR_030 &&
|
||||
if (CPU_IS_020_OR_030 && !regs->stkadj &&
|
||||
regs->vector >= (VEC_FPBRUC * 4) &&
|
||||
regs->vector <= (VEC_FPNAN * 4)) {
|
||||
/* Clear pending exception in 68882 idle frame */
|
||||
@@ -828,18 +828,24 @@ badframe:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct pt_regs *rte_regs(struct pt_regs *regs)
|
||||
{
|
||||
return (void *)regs + regs->stkadj;
|
||||
}
|
||||
|
||||
static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
|
||||
unsigned long mask)
|
||||
{
|
||||
struct pt_regs *tregs = rte_regs(regs);
|
||||
sc->sc_mask = mask;
|
||||
sc->sc_usp = rdusp();
|
||||
sc->sc_d0 = regs->d0;
|
||||
sc->sc_d1 = regs->d1;
|
||||
sc->sc_a0 = regs->a0;
|
||||
sc->sc_a1 = regs->a1;
|
||||
sc->sc_sr = regs->sr;
|
||||
sc->sc_pc = regs->pc;
|
||||
sc->sc_formatvec = regs->format << 12 | regs->vector;
|
||||
sc->sc_sr = tregs->sr;
|
||||
sc->sc_pc = tregs->pc;
|
||||
sc->sc_formatvec = tregs->format << 12 | tregs->vector;
|
||||
save_a5_state(sc, regs);
|
||||
save_fpu_state(sc, regs);
|
||||
}
|
||||
@@ -847,6 +853,7 @@ static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
|
||||
static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *regs)
|
||||
{
|
||||
struct switch_stack *sw = (struct switch_stack *)regs - 1;
|
||||
struct pt_regs *tregs = rte_regs(regs);
|
||||
greg_t __user *gregs = uc->uc_mcontext.gregs;
|
||||
int err = 0;
|
||||
|
||||
@@ -867,9 +874,9 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *
|
||||
err |= __put_user(sw->a5, &gregs[13]);
|
||||
err |= __put_user(sw->a6, &gregs[14]);
|
||||
err |= __put_user(rdusp(), &gregs[15]);
|
||||
err |= __put_user(regs->pc, &gregs[16]);
|
||||
err |= __put_user(regs->sr, &gregs[17]);
|
||||
err |= __put_user((regs->format << 12) | regs->vector, &uc->uc_formatvec);
|
||||
err |= __put_user(tregs->pc, &gregs[16]);
|
||||
err |= __put_user(tregs->sr, &gregs[17]);
|
||||
err |= __put_user((tregs->format << 12) | tregs->vector, &uc->uc_formatvec);
|
||||
err |= rt_save_fpu_state(uc, regs);
|
||||
return err;
|
||||
}
|
||||
@@ -886,13 +893,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct sigframe __user *frame;
|
||||
int fsize = frame_extra_sizes(regs->format);
|
||||
struct pt_regs *tregs = rte_regs(regs);
|
||||
int fsize = frame_extra_sizes(tregs->format);
|
||||
struct sigcontext context;
|
||||
int err = 0, sig = ksig->sig;
|
||||
|
||||
if (fsize < 0) {
|
||||
pr_debug("setup_frame: Unknown frame format %#x\n",
|
||||
regs->format);
|
||||
tregs->format);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@@ -903,7 +911,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
||||
|
||||
err |= __put_user(sig, &frame->sig);
|
||||
|
||||
err |= __put_user(regs->vector, &frame->code);
|
||||
err |= __put_user(tregs->vector, &frame->code);
|
||||
err |= __put_user(&frame->sc, &frame->psc);
|
||||
|
||||
if (_NSIG_WORDS > 1)
|
||||
@@ -929,34 +937,28 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
||||
|
||||
push_cache ((unsigned long) &frame->retcode);
|
||||
|
||||
/*
|
||||
* Set up registers for signal handler. All the state we are about
|
||||
* to destroy is successfully copied to sigframe.
|
||||
*/
|
||||
wrusp ((unsigned long) frame);
|
||||
regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
|
||||
adjustformat(regs);
|
||||
|
||||
/*
|
||||
* This is subtle; if we build more than one sigframe, all but the
|
||||
* first one will see frame format 0 and have fsize == 0, so we won't
|
||||
* screw stkadj.
|
||||
*/
|
||||
if (fsize)
|
||||
if (fsize) {
|
||||
regs->stkadj = fsize;
|
||||
|
||||
/* Prepare to skip over the extra stuff in the exception frame. */
|
||||
if (regs->stkadj) {
|
||||
struct pt_regs *tregs =
|
||||
(struct pt_regs *)((ulong)regs + regs->stkadj);
|
||||
tregs = rte_regs(regs);
|
||||
pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
|
||||
/* This must be copied with decreasing addresses to
|
||||
handle overlaps. */
|
||||
tregs->vector = 0;
|
||||
tregs->format = 0;
|
||||
tregs->pc = regs->pc;
|
||||
tregs->sr = regs->sr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up registers for signal handler. All the state we are about
|
||||
* to destroy is successfully copied to sigframe.
|
||||
*/
|
||||
wrusp ((unsigned long) frame);
|
||||
tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
|
||||
adjustformat(regs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -964,7 +966,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct rt_sigframe __user *frame;
|
||||
int fsize = frame_extra_sizes(regs->format);
|
||||
struct pt_regs *tregs = rte_regs(regs);
|
||||
int fsize = frame_extra_sizes(tregs->format);
|
||||
int err = 0, sig = ksig->sig;
|
||||
|
||||
if (fsize < 0) {
|
||||
@@ -1014,34 +1017,27 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||
|
||||
push_cache ((unsigned long) &frame->retcode);
|
||||
|
||||
/*
|
||||
* Set up registers for signal handler. All the state we are about
|
||||
* to destroy is successfully copied to sigframe.
|
||||
*/
|
||||
wrusp ((unsigned long) frame);
|
||||
regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
|
||||
adjustformat(regs);
|
||||
|
||||
/*
|
||||
* This is subtle; if we build more than one sigframe, all but the
|
||||
* first one will see frame format 0 and have fsize == 0, so we won't
|
||||
* screw stkadj.
|
||||
*/
|
||||
if (fsize)
|
||||
if (fsize) {
|
||||
regs->stkadj = fsize;
|
||||
|
||||
/* Prepare to skip over the extra stuff in the exception frame. */
|
||||
if (regs->stkadj) {
|
||||
struct pt_regs *tregs =
|
||||
(struct pt_regs *)((ulong)regs + regs->stkadj);
|
||||
tregs = rte_regs(regs);
|
||||
pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
|
||||
/* This must be copied with decreasing addresses to
|
||||
handle overlaps. */
|
||||
tregs->vector = 0;
|
||||
tregs->format = 0;
|
||||
tregs->pc = regs->pc;
|
||||
tregs->sr = regs->sr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up registers for signal handler. All the state we are about
|
||||
* to destroy is successfully copied to sigframe.
|
||||
*/
|
||||
wrusp ((unsigned long) frame);
|
||||
tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
|
||||
adjustformat(regs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1018,6 +1018,8 @@ static int gmc_v10_0_hw_fini(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
gmc_v10_0_gart_disable(adev);
|
||||
|
||||
if (amdgpu_sriov_vf(adev)) {
|
||||
/* full access mode, so don't touch any GMC register */
|
||||
DRM_DEBUG("For SRIOV client, shouldn't do anything.\n");
|
||||
@@ -1026,7 +1028,6 @@ static int gmc_v10_0_hw_fini(void *handle)
|
||||
|
||||
amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
|
||||
gmc_v10_0_gart_disable(adev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1677,6 +1677,8 @@ static int gmc_v9_0_hw_fini(void *handle)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
gmc_v9_0_gart_disable(adev);
|
||||
|
||||
if (amdgpu_sriov_vf(adev)) {
|
||||
/* full access mode, so don't touch any GMC register */
|
||||
DRM_DEBUG("For SRIOV client, shouldn't do anything.\n");
|
||||
@@ -1685,7 +1687,6 @@ static int gmc_v9_0_hw_fini(void *handle)
|
||||
|
||||
amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
|
||||
amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
|
||||
gmc_v9_0_gart_disable(adev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -322,12 +322,19 @@ static int apple_event(struct hid_device *hdev, struct hid_field *field,
|
||||
|
||||
/*
|
||||
* MacBook JIS keyboard has wrong logical maximum
|
||||
* Magic Keyboard JIS has wrong logical maximum
|
||||
*/
|
||||
static __u8 *apple_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
struct apple_sc *asc = hid_get_drvdata(hdev);
|
||||
|
||||
if(*rsize >=71 && rdesc[70] == 0x65 && rdesc[64] == 0x65) {
|
||||
hid_info(hdev,
|
||||
"fixing up Magic Keyboard JIS report descriptor\n");
|
||||
rdesc[64] = rdesc[70] = 0xe7;
|
||||
}
|
||||
|
||||
if ((asc->quirks & APPLE_RDESC_JIS) && *rsize >= 60 &&
|
||||
rdesc[53] == 0x65 && rdesc[59] == 0x65) {
|
||||
hid_info(hdev,
|
||||
|
||||
@@ -4715,6 +4715,12 @@ static const struct wacom_features wacom_features_0x393 =
|
||||
{ "Wacom Intuos Pro S", 31920, 19950, 8191, 63,
|
||||
INTUOSP2S_BT, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 7,
|
||||
.touch_max = 10 };
|
||||
static const struct wacom_features wacom_features_0x3c6 =
|
||||
{ "Wacom Intuos BT S", 15200, 9500, 4095, 63,
|
||||
INTUOSHT3_BT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
|
||||
static const struct wacom_features wacom_features_0x3c8 =
|
||||
{ "Wacom Intuos BT M", 21600, 13500, 4095, 63,
|
||||
INTUOSHT3_BT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
|
||||
|
||||
static const struct wacom_features wacom_features_HID_ANY_ID =
|
||||
{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };
|
||||
@@ -4888,6 +4894,8 @@ const struct hid_device_id wacom_ids[] = {
|
||||
{ USB_DEVICE_WACOM(0x37A) },
|
||||
{ USB_DEVICE_WACOM(0x37B) },
|
||||
{ BT_DEVICE_WACOM(0x393) },
|
||||
{ BT_DEVICE_WACOM(0x3c6) },
|
||||
{ BT_DEVICE_WACOM(0x3c8) },
|
||||
{ USB_DEVICE_WACOM(0x4001) },
|
||||
{ USB_DEVICE_WACOM(0x4004) },
|
||||
{ USB_DEVICE_WACOM(0x5000) },
|
||||
|
||||
@@ -989,8 +989,12 @@ static int ltc2947_setup(struct ltc2947_data *st)
|
||||
return ret;
|
||||
|
||||
/* check external clock presence */
|
||||
extclk = devm_clk_get(st->dev, NULL);
|
||||
if (!IS_ERR(extclk)) {
|
||||
extclk = devm_clk_get_optional(st->dev, NULL);
|
||||
if (IS_ERR(extclk))
|
||||
return dev_err_probe(st->dev, PTR_ERR(extclk),
|
||||
"Failed to get external clock\n");
|
||||
|
||||
if (extclk) {
|
||||
unsigned long rate_hz;
|
||||
u8 pre = 0, div, tbctl;
|
||||
u64 aux;
|
||||
|
||||
@@ -171,8 +171,14 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf,
|
||||
cmd = CFFPS_SN_CMD;
|
||||
break;
|
||||
case CFFPS_DEBUGFS_MAX_POWER_OUT:
|
||||
rc = i2c_smbus_read_word_swapped(psu->client,
|
||||
CFFPS_MAX_POWER_OUT_CMD);
|
||||
if (psu->version == cffps1) {
|
||||
rc = i2c_smbus_read_word_swapped(psu->client,
|
||||
CFFPS_MAX_POWER_OUT_CMD);
|
||||
} else {
|
||||
rc = i2c_smbus_read_word_data(psu->client,
|
||||
CFFPS_MAX_POWER_OUT_CMD);
|
||||
}
|
||||
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ config CASSINI
|
||||
config SUNVNET_COMMON
|
||||
tristate "Common routines to support Sun Virtual Networking"
|
||||
depends on SUN_LDOMS
|
||||
depends on INET
|
||||
default m
|
||||
|
||||
config SUNVNET
|
||||
|
||||
@@ -118,7 +118,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
|
||||
static int ses_send_diag(struct scsi_device *sdev, int page_code,
|
||||
void *buf, int bufflen)
|
||||
{
|
||||
u32 result;
|
||||
int result;
|
||||
|
||||
unsigned char cmd[] = {
|
||||
SEND_DIAGNOSTIC,
|
||||
|
||||
@@ -302,7 +302,7 @@ static void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr_info("Unsupport virtio scsi event reason %x\n", event->reason);
|
||||
pr_info("Unsupported virtio scsi event reason %x\n", event->reason);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ static void virtscsi_handle_event(struct work_struct *work)
|
||||
virtscsi_handle_param_change(vscsi, event);
|
||||
break;
|
||||
default:
|
||||
pr_err("Unsupport virtio scsi event %x\n", event->event);
|
||||
pr_err("Unsupported virtio scsi event %x\n", event->event);
|
||||
}
|
||||
virtscsi_kick_event(vscsi, event_node);
|
||||
}
|
||||
|
||||
@@ -747,18 +747,13 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
|
||||
void *kaddr;
|
||||
struct ext4_iloc iloc;
|
||||
|
||||
if (unlikely(copied < len)) {
|
||||
if (!PageUptodate(page)) {
|
||||
copied = 0;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (unlikely(copied < len) && !PageUptodate(page))
|
||||
return 0;
|
||||
|
||||
ret = ext4_get_inode_loc(inode, &iloc);
|
||||
if (ret) {
|
||||
ext4_std_error(inode->i_sb, ret);
|
||||
copied = 0;
|
||||
goto out;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ext4_write_lock_xattr(inode, &no_expand);
|
||||
@@ -771,7 +766,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
|
||||
(void) ext4_find_inline_data_nolock(inode);
|
||||
|
||||
kaddr = kmap_atomic(page);
|
||||
ext4_write_inline_data(inode, &iloc, kaddr, pos, len);
|
||||
ext4_write_inline_data(inode, &iloc, kaddr, pos, copied);
|
||||
kunmap_atomic(kaddr);
|
||||
SetPageUptodate(page);
|
||||
/* clear page dirty so that writepages wouldn't work for us. */
|
||||
@@ -780,7 +775,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
|
||||
ext4_write_unlock_xattr(inode, &no_expand);
|
||||
brelse(iloc.bh);
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
|
||||
return copied;
|
||||
}
|
||||
|
||||
|
||||
@@ -1308,6 +1308,7 @@ static int ext4_write_end(struct file *file,
|
||||
goto errout;
|
||||
}
|
||||
copied = ret;
|
||||
ret = 0;
|
||||
} else
|
||||
copied = block_write_end(file, mapping, pos,
|
||||
len, copied, page, fsdata);
|
||||
@@ -1334,13 +1335,14 @@ static int ext4_write_end(struct file *file,
|
||||
if (i_size_changed || inline_data)
|
||||
ret = ext4_mark_inode_dirty(handle, inode);
|
||||
|
||||
errout:
|
||||
if (pos + len > inode->i_size && !verity && ext4_can_truncate(inode))
|
||||
/* if we have allocated more blocks and copied
|
||||
* less. We will have blocks allocated outside
|
||||
* inode->i_size. So truncate them
|
||||
*/
|
||||
ext4_orphan_add(handle, inode);
|
||||
errout:
|
||||
|
||||
ret2 = ext4_journal_stop(handle);
|
||||
if (!ret)
|
||||
ret = ret2;
|
||||
@@ -1424,6 +1426,7 @@ static int ext4_journalled_write_end(struct file *file,
|
||||
goto errout;
|
||||
}
|
||||
copied = ret;
|
||||
ret = 0;
|
||||
} else if (unlikely(copied < len) && !PageUptodate(page)) {
|
||||
copied = 0;
|
||||
ext4_journalled_zero_new_buffers(handle, page, from, to);
|
||||
@@ -1453,6 +1456,7 @@ static int ext4_journalled_write_end(struct file *file,
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
errout:
|
||||
if (pos + len > inode->i_size && !verity && ext4_can_truncate(inode))
|
||||
/* if we have allocated more blocks and copied
|
||||
* less. We will have blocks allocated outside
|
||||
@@ -1460,7 +1464,6 @@ static int ext4_journalled_write_end(struct file *file,
|
||||
*/
|
||||
ext4_orphan_add(handle, inode);
|
||||
|
||||
errout:
|
||||
ret2 = ext4_journal_stop(handle);
|
||||
if (!ret)
|
||||
ret = ret2;
|
||||
@@ -3114,35 +3117,37 @@ static int ext4_da_write_end(struct file *file,
|
||||
end = start + copied - 1;
|
||||
|
||||
/*
|
||||
* generic_write_end() will run mark_inode_dirty() if i_size
|
||||
* changes. So let's piggyback the i_disksize mark_inode_dirty
|
||||
* into that.
|
||||
* Since we are holding inode lock, we are sure i_disksize <=
|
||||
* i_size. We also know that if i_disksize < i_size, there are
|
||||
* delalloc writes pending in the range upto i_size. If the end of
|
||||
* the current write is <= i_size, there's no need to touch
|
||||
* i_disksize since writeback will push i_disksize upto i_size
|
||||
* eventually. If the end of the current write is > i_size and
|
||||
* inside an allocated block (ext4_da_should_update_i_disksize()
|
||||
* check), we need to update i_disksize here as neither
|
||||
* ext4_writepage() nor certain ext4_writepages() paths not
|
||||
* allocating blocks update i_disksize.
|
||||
*
|
||||
* Note that we defer inode dirtying to generic_write_end() /
|
||||
* ext4_da_write_inline_data_end().
|
||||
*/
|
||||
new_i_size = pos + copied;
|
||||
if (copied && new_i_size > EXT4_I(inode)->i_disksize) {
|
||||
if (copied && new_i_size > inode->i_size) {
|
||||
if (ext4_has_inline_data(inode) ||
|
||||
ext4_da_should_update_i_disksize(page, end)) {
|
||||
ext4_da_should_update_i_disksize(page, end))
|
||||
ext4_update_i_disksize(inode, new_i_size);
|
||||
/* We need to mark inode dirty even if
|
||||
* new_i_size is less that inode->i_size
|
||||
* bu greater than i_disksize.(hint delalloc)
|
||||
*/
|
||||
ret = ext4_mark_inode_dirty(handle, inode);
|
||||
}
|
||||
}
|
||||
|
||||
if (write_mode != CONVERT_INLINE_DATA &&
|
||||
ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) &&
|
||||
ext4_has_inline_data(inode))
|
||||
ret2 = ext4_da_write_inline_data_end(inode, pos, len, copied,
|
||||
ret = ext4_da_write_inline_data_end(inode, pos, len, copied,
|
||||
page);
|
||||
else
|
||||
ret2 = generic_write_end(file, mapping, pos, len, copied,
|
||||
ret = generic_write_end(file, mapping, pos, len, copied,
|
||||
page, fsdata);
|
||||
|
||||
copied = ret2;
|
||||
if (ret2 < 0)
|
||||
ret = ret2;
|
||||
copied = ret;
|
||||
ret2 = ext4_journal_stop(handle);
|
||||
if (unlikely(ret2 && !ret))
|
||||
ret = ret2;
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
|
||||
#define VBOXSF_SUPER_MAGIC 0x786f4256 /* 'VBox' little endian */
|
||||
|
||||
#define VBSF_MOUNT_SIGNATURE_BYTE_0 ('\000')
|
||||
#define VBSF_MOUNT_SIGNATURE_BYTE_1 ('\377')
|
||||
#define VBSF_MOUNT_SIGNATURE_BYTE_2 ('\376')
|
||||
#define VBSF_MOUNT_SIGNATURE_BYTE_3 ('\375')
|
||||
static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375";
|
||||
|
||||
static int follow_symlinks;
|
||||
module_param(follow_symlinks, int, 0444);
|
||||
@@ -386,12 +383,7 @@ fail_nomem:
|
||||
|
||||
static int vboxsf_parse_monolithic(struct fs_context *fc, void *data)
|
||||
{
|
||||
unsigned char *options = data;
|
||||
|
||||
if (options && options[0] == VBSF_MOUNT_SIGNATURE_BYTE_0 &&
|
||||
options[1] == VBSF_MOUNT_SIGNATURE_BYTE_1 &&
|
||||
options[2] == VBSF_MOUNT_SIGNATURE_BYTE_2 &&
|
||||
options[3] == VBSF_MOUNT_SIGNATURE_BYTE_3) {
|
||||
if (data && !memcmp(data, VBSF_MOUNT_SIGNATURE, 4)) {
|
||||
vbg_err("vboxsf: Old binary mount data not supported, remove obsolete mount.vboxsf and/or update your VBoxService.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -682,7 +682,9 @@ struct perf_event {
|
||||
/*
|
||||
* timestamp shadows the actual context timing but it can
|
||||
* be safely used in NMI interrupt context. It reflects the
|
||||
* context time as it was when the event was last scheduled in.
|
||||
* context time as it was when the event was last scheduled in,
|
||||
* or when ctx_sched_in failed to schedule the event because we
|
||||
* run out of PMC.
|
||||
*
|
||||
* ctx_time already accounts for ctx->timestamp. Therefore to
|
||||
* compute ctx_time for a sample, simply add perf_clock().
|
||||
|
||||
@@ -1621,7 +1621,7 @@ extern struct pid *cad_pid;
|
||||
#define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
|
||||
#define used_math() tsk_used_math(current)
|
||||
|
||||
static inline bool is_percpu_thread(void)
|
||||
static __always_inline bool is_percpu_thread(void)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
return (current->flags & PF_NO_SETAFFINITY) &&
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <uapi/linux/pkt_sched.h>
|
||||
|
||||
#define DEFAULT_TX_QUEUE_LEN 1000
|
||||
#define STAB_SIZE_LOG_MAX 30
|
||||
|
||||
struct qdisc_walker {
|
||||
int stop;
|
||||
|
||||
@@ -3695,6 +3695,29 @@ static noinline int visit_groups_merge(struct perf_cpu_context *cpuctx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool event_update_userpage(struct perf_event *event)
|
||||
{
|
||||
if (likely(!atomic_read(&event->mmap_count)))
|
||||
return false;
|
||||
|
||||
perf_event_update_time(event);
|
||||
perf_set_shadow_time(event, event->ctx);
|
||||
perf_event_update_userpage(event);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void group_update_userpage(struct perf_event *group_event)
|
||||
{
|
||||
struct perf_event *event;
|
||||
|
||||
if (!event_update_userpage(group_event))
|
||||
return;
|
||||
|
||||
for_each_sibling_event(event, group_event)
|
||||
event_update_userpage(event);
|
||||
}
|
||||
|
||||
static int merge_sched_in(struct perf_event *event, void *data)
|
||||
{
|
||||
struct perf_event_context *ctx = event->ctx;
|
||||
@@ -3713,14 +3736,15 @@ static int merge_sched_in(struct perf_event *event, void *data)
|
||||
}
|
||||
|
||||
if (event->state == PERF_EVENT_STATE_INACTIVE) {
|
||||
*can_add_hw = 0;
|
||||
if (event->attr.pinned) {
|
||||
perf_cgroup_event_disable(event, ctx);
|
||||
perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
|
||||
} else {
|
||||
ctx->rotate_necessary = 1;
|
||||
perf_mux_hrtimer_restart(cpuctx);
|
||||
group_update_userpage(event);
|
||||
}
|
||||
|
||||
*can_add_hw = 0;
|
||||
ctx->rotate_necessary = 1;
|
||||
perf_mux_hrtimer_restart(cpuctx);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -6240,6 +6264,8 @@ accounting:
|
||||
|
||||
ring_buffer_attach(event, rb);
|
||||
|
||||
perf_event_update_time(event);
|
||||
perf_set_shadow_time(event, event->ctx);
|
||||
perf_event_init_userpage(event);
|
||||
perf_event_update_userpage(event);
|
||||
} else {
|
||||
|
||||
@@ -273,6 +273,7 @@ ip6t_do_table(struct sk_buff *skb,
|
||||
* things we don't know, ie. tcp syn flag or ports). If the
|
||||
* rule is also a fragment-specific rule, non-fragments won't
|
||||
* match it. */
|
||||
acpar.fragoff = 0;
|
||||
acpar.hotdrop = false;
|
||||
acpar.state = state;
|
||||
|
||||
|
||||
@@ -60,7 +60,10 @@ static struct mesh_table *mesh_table_alloc(void)
|
||||
atomic_set(&newtbl->entries, 0);
|
||||
spin_lock_init(&newtbl->gates_lock);
|
||||
spin_lock_init(&newtbl->walk_lock);
|
||||
rhashtable_init(&newtbl->rhead, &mesh_rht_params);
|
||||
if (rhashtable_init(&newtbl->rhead, &mesh_rht_params)) {
|
||||
kfree(newtbl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return newtbl;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user