Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75181
b: refs/heads/master
c: 2634d06
h: refs/heads/master
i:
  75179: 624df8e
v: v3
  • Loading branch information
Linus Torvalds committed Dec 23, 2007
1 parent bf46aa5 commit 6090ce5
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 56 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: bdcba1511b98f2e728b3a910b8771a0d3fce5bf3
refs/heads/master: 2634d064c16cc897bc850a109bbea781b50d1ad5
6 changes: 3 additions & 3 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ P: James Ketrenos
M: jketreno@linux.intel.com
L: linux-wireless@vger.kernel.org
L: ipw2100-devel@lists.sourceforge.net
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
W: http://ipw2100.sourceforge.net
S: Supported

Expand All @@ -2040,7 +2040,7 @@ P: James Ketrenos
M: jketreno@linux.intel.com
L: linux-wireless@vger.kernel.org
L: ipw2100-devel@lists.sourceforge.net
L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
W: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
W: http://ipw2200.sourceforge.net
S: Supported

Expand Down Expand Up @@ -2597,7 +2597,7 @@ S: Maintained
MSI LAPTOP SUPPORT
P: Lennart Poettering
M: mzxreary@0pointer.de
L: https://tango.0pointer.de/mailman/listinfo/s270-linux
W: https://tango.0pointer.de/mailman/listinfo/s270-linux
W: http://0pointer.de/lennart/tchibo.html
S: Maintained

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/drivers/harddog_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
n = read(in_fds[0], &c, sizeof(c));
if (n == 0) {
printk("harddog_open - EOF on watchdog pipe\n");
helper_wait(pid);
helper_wait(pid, 1, NULL);
err = -EIO;
goto out_close_out;
}
else if (n < 0) {
printk("harddog_open - read of watchdog pipe failed, "
"err = %d\n", errno);
helper_wait(pid);
helper_wait(pid, 1, NULL);
err = n;
goto out_close_out;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/tty_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void tty_wait_until_sent(struct tty_struct * tty, long timeout)
if (!timeout)
timeout = MAX_SCHEDULE_TIMEOUT;
if (wait_event_interruptible_timeout(tty->write_wait,
!tty->driver->chars_in_buffer(tty), timeout))
!tty->driver->chars_in_buffer(tty), timeout) < 0)
return;
if (tty->driver->wait_until_sent)
tty->driver->wait_until_sent(tty, timeout);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pcmcia/pxa2xx_lubbock.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static struct pcmcia_low_level lubbock_pcmcia_ops = {

#include "pxa2xx_base.h"

int __init pcmcia_lubbock_init(struct sa1111_dev *sadev)
int pcmcia_lubbock_init(struct sa1111_dev *sadev)
{
int ret = -ENODEV;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ps3/ps3-vuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,6 @@ static int ps3_vuart_probe(struct ps3_system_bus_device *dev)
if (result) {
dev_dbg(&dev->core, "%s:%d: drv->probe failed\n",
__func__, __LINE__);
down(&vuart_bus_priv.probe_mutex);
goto fail_probe;
}

Expand Down
32 changes: 20 additions & 12 deletions trunk/fs/dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,18 @@ static inline void dquot_decr_space(struct dquot *dquot, qsize_t number)
clear_bit(DQ_BLKS_B, &dquot->dq_flags);
}

static int warning_issued(struct dquot *dquot, const int warntype)
{
int flag = (warntype == QUOTA_NL_BHARDWARN ||
warntype == QUOTA_NL_BSOFTLONGWARN) ? DQ_BLKS_B :
((warntype == QUOTA_NL_IHARDWARN ||
warntype == QUOTA_NL_ISOFTLONGWARN) ? DQ_INODES_B : 0);

if (!flag)
return 0;
return test_and_set_bit(flag, &dquot->dq_flags);
}

#ifdef CONFIG_PRINT_QUOTA_WARNING
static int flag_print_warnings = 1;

Expand All @@ -845,16 +857,12 @@ static inline int need_print_warning(struct dquot *dquot)
}

/* Print warning to user which exceeded quota */
static void print_warning(struct dquot *dquot, const char warntype)
static void print_warning(struct dquot *dquot, const int warntype)
{
char *msg = NULL;
struct tty_struct *tty;
int flag = (warntype == QUOTA_NL_BHARDWARN ||
warntype == QUOTA_NL_BSOFTLONGWARN) ? DQ_BLKS_B :
((warntype == QUOTA_NL_IHARDWARN ||
warntype == QUOTA_NL_ISOFTLONGWARN) ? DQ_INODES_B : 0);

if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags)))
if (!need_print_warning(dquot))
return;

mutex_lock(&tty_mutex);
Expand Down Expand Up @@ -895,9 +903,6 @@ static void print_warning(struct dquot *dquot, const char warntype)

#ifdef CONFIG_QUOTA_NETLINK_INTERFACE

/* Size of quota netlink message - actually an upperbound for buffer size */
#define QUOTA_NL_MSG_SIZE 32

/* Netlink family structure for quota */
static struct genl_family quota_genl_family = {
.id = GENL_ID_GENERATE,
Expand All @@ -914,11 +919,13 @@ static void send_warning(const struct dquot *dquot, const char warntype)
struct sk_buff *skb;
void *msg_head;
int ret;
int msg_size = 4 * nla_total_size(sizeof(u32)) +
2 * nla_total_size(sizeof(u64));

/* We have to allocate using GFP_NOFS as we are called from a
* filesystem performing write and thus further recursion into
* the fs to free some data could cause deadlocks. */
skb = genlmsg_new(QUOTA_NL_MSG_SIZE, GFP_NOFS);
skb = genlmsg_new(msg_size, GFP_NOFS);
if (!skb) {
printk(KERN_ERR
"VFS: Not enough memory to send quota warning.\n");
Expand Down Expand Up @@ -959,7 +966,7 @@ static void send_warning(const struct dquot *dquot, const char warntype)
"VFS: Failed to send notification message: %d\n", ret);
return;
attr_err_out:
printk(KERN_ERR "VFS: Failed to compose quota message: %d\n", ret);
printk(KERN_ERR "VFS: Not enough space to compose quota message!\n");
err_out:
kfree_skb(skb);
}
Expand All @@ -970,7 +977,8 @@ static inline void flush_warnings(struct dquot * const *dquots, char *warntype)
int i;

for (i = 0; i < MAXQUOTAS; i++)
if (dquots[i] != NODQUOT && warntype[i] != QUOTA_NL_NOWARN) {
if (dquots[i] != NODQUOT && warntype[i] != QUOTA_NL_NOWARN &&
!warning_issued(dquots[i], warntype[i])) {
#ifdef CONFIG_PRINT_QUOTA_WARNING
print_warning(dquots[i], warntype[i]);
#endif
Expand Down
9 changes: 5 additions & 4 deletions trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
rc = ecryptfs_crypto_api_algify_cipher_name(&full_alg_name,
crypt_stat->cipher, "cbc");
if (rc)
goto out;
goto out_unlock;
crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0,
CRYPTO_ALG_ASYNC);
kfree(full_alg_name);
Expand All @@ -808,12 +808,12 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)
ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
"Error initializing cipher [%s]\n",
crypt_stat->cipher);
mutex_unlock(&crypt_stat->cs_tfm_mutex);
goto out;
goto out_unlock;
}
crypto_blkcipher_set_flags(crypt_stat->tfm, CRYPTO_TFM_REQ_WEAK_KEY);
mutex_unlock(&crypt_stat->cs_tfm_mutex);
rc = 0;
out_unlock:
mutex_unlock(&crypt_stat->cs_tfm_mutex);
out:
return rc;
}
Expand Down Expand Up @@ -1847,6 +1847,7 @@ ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name,
mutex_init(&tmp_tfm->key_tfm_mutex);
strncpy(tmp_tfm->cipher_name, cipher_name,
ECRYPTFS_MAX_CIPHER_NAME_SIZE);
tmp_tfm->cipher_name[ECRYPTFS_MAX_CIPHER_NAME_SIZE] = '\0';
tmp_tfm->key_size = key_size;
rc = ecryptfs_process_key_cipher(&tmp_tfm->key_tfm,
tmp_tfm->cipher_name,
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/ecryptfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
inode_info->lower_file = dentry_open(lower_dentry,
lower_mnt,
(O_RDWR | O_LARGEFILE));
if (IS_ERR(inode_info->lower_file))
if (IS_ERR(inode_info->lower_file)) {
dget(lower_dentry);
mntget(lower_mnt);
inode_info->lower_file = dentry_open(lower_dentry,
lower_mnt,
(O_RDONLY
| O_LARGEFILE));
}
if (IS_ERR(inode_info->lower_file)) {
printk(KERN_ERR "Error opening lower persistent file "
"for lower_dentry [0x%p] and lower_mnt [0x%p]\n",
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ecryptfs/messaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ int ecryptfs_init_messaging(unsigned int transport)
if (!ecryptfs_daemon_id_hash) {
rc = -ENOMEM;
ecryptfs_printk(KERN_ERR, "Failed to allocate memory\n");
mutex_unlock(&ecryptfs_daemon_id_hash_mux);
goto out;
}
for (i = 0; i < ecryptfs_hash_buckets; i++)
Expand Down
8 changes: 0 additions & 8 deletions trunk/include/linux/quicklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ static inline void __quicklist_free(int nr, void (*dtor)(void *), void *p,
struct page *page)
{
struct quicklist *q;
int nid = page_to_nid(page);

if (unlikely(nid != numa_node_id())) {
if (dtor)
dtor(p);
__free_page(page);
return;
}

q = &get_cpu_var(quicklist)[nr];
*(void **)p = q->page;
Expand Down
37 changes: 16 additions & 21 deletions trunk/lib/proportions.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ prop_adjust_shift(int *pl_shift, unsigned long *pl_period, int new_shift)
* PERCPU
*/

#define PROP_BATCH (8*(1+ilog2(nr_cpu_ids)))

int prop_local_init_percpu(struct prop_local_percpu *pl)
{
spin_lock_init(&pl->lock);
Expand Down Expand Up @@ -230,31 +232,24 @@ void prop_norm_percpu(struct prop_global *pg, struct prop_local_percpu *pl)

spin_lock_irqsave(&pl->lock, flags);
prop_adjust_shift(&pl->shift, &pl->period, pg->shift);

/*
* For each missed period, we half the local counter.
* basically:
* pl->events >> (global_period - pl->period);
*
* but since the distributed nature of percpu counters make division
* rather hard, use a regular subtraction loop. This is safe, because
* the events will only every be incremented, hence the subtraction
* can never result in a negative number.
*/
while (pl->period != global_period) {
unsigned long val = percpu_counter_read(&pl->events);
unsigned long half = (val + 1) >> 1;

/*
* Half of zero won't be much less, break out.
* This limits the loop to shift iterations, even
* if we missed a million.
*/
if (!val)
break;

percpu_counter_add(&pl->events, -half);
pl->period += period;
}
period = (global_period - pl->period) >> (pg->shift - 1);
if (period < BITS_PER_LONG) {
s64 val = percpu_counter_read(&pl->events);

if (val < (nr_cpu_ids * PROP_BATCH))
val = percpu_counter_sum(&pl->events);

__percpu_counter_add(&pl->events, -val + (val >> period),
PROP_BATCH);
} else
percpu_counter_set(&pl->events, 0);

pl->period = global_period;
spin_unlock_irqrestore(&pl->lock, flags);
}
Expand All @@ -267,7 +262,7 @@ void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl)
struct prop_global *pg = prop_get_global(pd);

prop_norm_percpu(pg, pl);
percpu_counter_add(&pl->events, 1);
__percpu_counter_add(&pl->events, 1, PROP_BATCH);
percpu_counter_add(&pg->events, 1);
prop_put_global(pd, pg);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ static int conf_choice(struct menu *menu)
continue;
break;
case set_random:
def = (random() % cnt) + 1;
if (is_new)
def = (random() % cnt) + 1;
case set_default:
case set_yes:
case set_mod:
Expand Down

0 comments on commit 6090ce5

Please sign in to comment.