Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362738
b: refs/heads/master
c: 96edcf3
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 26, 2013
1 parent 3c365f6 commit 8592252
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bda079d336cd8183e1d844a265ea87ae3e1bbe78
refs/heads/master: 96edcf31b3b9d9f53adb110fd4c4d49b458497a9
4 changes: 2 additions & 2 deletions trunk/arch/x86/boot/compressed/eboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ static efi_status_t setup_efi_vars(struct boot_params *params)
u64 store_size, remaining_size, var_size;
efi_status_t status;

if (!sys_table->runtime->query_variable_info)
if (sys_table->runtime->hdr.revision < EFI_2_00_SYSTEM_TABLE_REVISION)
return EFI_UNSUPPORTED;

data = (struct setup_data *)(unsigned long)params->hdr.setup_data;

while (data && data->next)
data = (struct setup_data *)(unsigned long)data->next;

status = efi_call_phys4(sys_table->runtime->query_variable_info,
status = efi_call_phys4((void *)sys_table->runtime->query_variable_info,
EFI_VARIABLE_NON_VOLATILE |
EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS, &store_size,
Expand Down
12 changes: 7 additions & 5 deletions trunk/drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,10 +1628,11 @@ static ssize_t efivar_delete(struct file *filp, struct kobject *kobj,
return count;
}

static bool variable_is_present(efi_char16_t *variable_name, efi_guid_t *vendor)
static bool variable_is_present(struct efivars *efivars,
efi_char16_t *variable_name,
efi_guid_t *vendor)
{
struct efivar_entry *entry, *n;
struct efivars *efivars = &__efivars;
unsigned long strsize1, strsize2;
bool found = false;

Expand Down Expand Up @@ -1703,8 +1704,8 @@ static void efivar_update_sysfs_entries(struct work_struct *work)
if (status != EFI_SUCCESS) {
break;
} else {
if (!variable_is_present(variable_name,
&vendor)) {
if (!variable_is_present(efivars,
variable_name, &vendor)) {
found = true;
break;
}
Expand Down Expand Up @@ -2008,7 +2009,8 @@ int register_efivars(struct efivars *efivars,
* we'll ever see a different variable name,
* and may end up looping here forever.
*/
if (variable_is_present(variable_name, &vendor_guid)) {
if (variable_is_present(efivars, variable_name,
&vendor_guid)) {
dup_variable_bug(variable_name, &vendor_guid,
variable_name_size);
status = EFI_NOT_FOUND;
Expand Down
18 changes: 16 additions & 2 deletions trunk/drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,14 @@ void start_tty(struct tty_struct *tty)

EXPORT_SYMBOL(start_tty);

static void tty_update_time(struct timespec *time)
{
unsigned long sec = get_seconds();
sec -= sec % 60;
if ((long)(sec - time->tv_sec) > 0)
time->tv_sec = sec;
}

/**
* tty_read - read method for tty device files
* @file: pointer to tty file
Expand All @@ -960,10 +968,11 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{
int i;
struct inode *inode = file_inode(file);
struct tty_struct *tty = file_tty(file);
struct tty_ldisc *ld;

if (tty_paranoia_check(tty, file_inode(file), "tty_read"))
if (tty_paranoia_check(tty, inode, "tty_read"))
return -EIO;
if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags)))
return -EIO;
Expand All @@ -977,6 +986,9 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
i = -EIO;
tty_ldisc_deref(ld);

if (i > 0)
tty_update_time(&inode->i_atime);

return i;
}

Expand Down Expand Up @@ -1077,8 +1089,10 @@ static inline ssize_t do_tty_write(
break;
cond_resched();
}
if (written)
if (written) {
tty_update_time(&file_inode(file)->i_mtime);
ret = written;
}
out:
tty_write_unlock(tty);
return ret;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,9 +1029,9 @@ static int aio_read_evt(struct kioctx *ioctx, struct io_event *ent)
spin_unlock(&info->ring_lock);

out:
kunmap_atomic(ring);
dprintk("leaving aio_read_evt: %d h%lu t%lu\n", ret,
(unsigned long)ring->head, (unsigned long)ring->tail);
kunmap_atomic(ring);
return ret;
}

Expand Down

0 comments on commit 8592252

Please sign in to comment.