Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

This commit is contained in:
Larry Finger 2011-04-08 20:52:00 -05:00
commit 0215c5cfd7
12 changed files with 68 additions and 71 deletions

View file

@ -460,7 +460,7 @@ startup:
#ifndef CONFIG_MARCH_G5
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
stfl __LC_STFL_FAC_LIST # store facility list
.insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
jz 0f
la %r0,0

View file

@ -46,7 +46,9 @@ smp_restart_cpu:
ltr %r4,%r4 /* New stack ? */
jz 1f
lr %r15,%r4
1: basr %r14,%r2
1: lr %r14,%r2 /* r14: Function to call */
lr %r2,%r3 /* r2 : Parameter for function*/
basr %r14,%r14 /* Call function */
.gprregs_addr:
.long .gprregs

View file

@ -42,7 +42,9 @@ smp_restart_cpu:
ltgr %r4,%r4 /* New stack ? */
jz 1f
lgr %r15,%r4
1: basr %r14,%r2
1: lgr %r14,%r2 /* r14: Function to call */
lgr %r2,%r3 /* r2 : Parameter for function*/
basr %r14,%r14 /* Call function */
.section .data,"aw",@progbits
.gprregs:

View file

@ -517,12 +517,8 @@ static int stop_sampling(int cpu)
static int check_hardware_prerequisites(void)
{
unsigned long long facility_bits[2];
memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32);
if (!(facility_bits[1] & (1ULL << 59)))
if (!test_facility(68))
return -EOPNOTSUPP;
return 0;
}
/*

View file

@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
int force, ret;
unsigned long i;
if (!dev_fsm_final_state(cdev) &&
cdev->private->state != DEV_STATE_DISCONNECTED)
return -EAGAIN;
/* Prevent conflict between multiple on-/offline processing requests. */
if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0)
return -EAGAIN;
/* Prevent conflict between internal I/Os and on-/offline processing. */
if (!dev_fsm_final_state(cdev) &&
cdev->private->state != DEV_STATE_DISCONNECTED) {
ret = -EAGAIN;
goto out_onoff;
}
/* Prevent conflict between pending work and on-/offline processing.*/
if (work_pending(&cdev->private->todo_work)) {
ret = -EAGAIN;
goto out_onoff;
}
if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) {
atomic_set(&cdev->private->onoff, 0);
return -EINVAL;
ret = -EINVAL;
goto out_onoff;
}
if (!strncmp(buf, "force\n", count)) {
force = 1;
@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr,
out:
if (cdev->drv)
module_put(cdev->drv->driver.owner);
out_onoff:
atomic_set(&cdev->private->onoff, 0);
return (ret < 0) ? ret : count;
}
@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data)
spin_lock_irq(cdev->ccwlock);
if (is_blacklisted(id->ssid, id->devno) &&
(cdev->private->state == DEV_STATE_OFFLINE)) {
(cdev->private->state == DEV_STATE_OFFLINE) &&
(atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) {
CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid,
id->devno);
ccw_device_sched_todo(cdev, CDEV_TODO_UNREG);
atomic_set(&cdev->private->onoff, 0);
}
spin_unlock_irq(cdev->ccwlock);
/* Abort loop in case of pending signal. */

View file

@ -1649,26 +1649,26 @@ static int __init init_QDIO(void)
{
int rc;
rc = qdio_setup_init();
rc = qdio_debug_init();
if (rc)
return rc;
rc = qdio_setup_init();
if (rc)
goto out_debug;
rc = tiqdio_allocate_memory();
if (rc)
goto out_cache;
rc = qdio_debug_init();
if (rc)
goto out_ti;
rc = tiqdio_register_thinints();
if (rc)
goto out_debug;
goto out_ti;
return 0;
out_debug:
qdio_debug_exit();
out_ti:
tiqdio_free_memory();
out_cache:
qdio_setup_exit();
out_debug:
qdio_debug_exit();
return rc;
}
@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void)
{
tiqdio_unregister_thinints();
tiqdio_free_memory();
qdio_debug_exit();
qdio_setup_exit();
qdio_debug_exit();
}
module_init(init_QDIO);

View file

@ -3291,7 +3291,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode)
if (ext3_should_journal_data(inode))
ret = 3 * (bpp + indirects) + 2;
else
ret = 2 * (bpp + indirects) + 2;
ret = 2 * (bpp + indirects) + indirects + 2;
#ifdef CONFIG_QUOTA
/* We know that structure was already allocated during dquot_initialize so

View file

@ -148,67 +148,64 @@ static rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors,
return pseudoflavor;
}
static rpc_authflavor_t nfs_negotiate_security(const struct dentry *parent, const struct dentry *dentry)
static int nfs_negotiate_security(const struct dentry *parent,
const struct dentry *dentry,
rpc_authflavor_t *flavor)
{
int status = 0;
struct page *page;
struct nfs4_secinfo_flavors *flavors;
int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
rpc_authflavor_t flavor = RPC_AUTH_UNIX;
int ret = -EPERM;
secinfo = NFS_PROTO(parent->d_inode)->secinfo;
if (secinfo != NULL) {
page = alloc_page(GFP_KERNEL);
if (!page) {
status = -ENOMEM;
ret = -ENOMEM;
goto out;
}
flavors = page_address(page);
status = secinfo(parent->d_inode, &dentry->d_name, flavors);
flavor = nfs_find_best_sec(flavors, dentry->d_inode);
ret = secinfo(parent->d_inode, &dentry->d_name, flavors);
*flavor = nfs_find_best_sec(flavors, dentry->d_inode);
put_page(page);
}
return flavor;
out:
status = -ENOMEM;
return status;
return ret;
}
static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
struct dentry *dentry, struct path *path,
struct nfs_fh *fh, struct nfs_fattr *fattr)
static int nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
struct dentry *dentry, struct path *path,
struct nfs_fh *fh, struct nfs_fattr *fattr,
rpc_authflavor_t *flavor)
{
rpc_authflavor_t flavor;
struct rpc_clnt *clone;
struct rpc_auth *auth;
int err;
flavor = nfs_negotiate_security(parent, path->dentry);
if (flavor < 0)
err = nfs_negotiate_security(parent, path->dentry, flavor);
if (err < 0)
goto out;
clone = rpc_clone_client(server->client);
auth = rpcauth_create(flavor, clone);
auth = rpcauth_create(*flavor, clone);
if (!auth) {
flavor = -EIO;
err = -EIO;
goto out_shutdown;
}
err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode,
&path->dentry->d_name,
fh, fattr);
if (err < 0)
flavor = err;
out_shutdown:
rpc_shutdown_client(clone);
out:
return flavor;
return err;
}
#else /* CONFIG_NFS_V4 */
static inline rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server,
struct dentry *parent, struct dentry *dentry,
struct path *path, struct nfs_fh *fh,
struct nfs_fattr *fattr)
static inline int nfs_lookup_with_sec(struct nfs_server *server,
struct dentry *parent, struct dentry *dentry,
struct path *path, struct nfs_fh *fh,
struct nfs_fattr *fattr,
rpc_authflavor_t *flavor)
{
return -EPERM;
}
@ -234,7 +231,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
struct nfs_fh *fh = NULL;
struct nfs_fattr *fattr = NULL;
int err;
rpc_authflavor_t flavor = 1;
rpc_authflavor_t flavor = RPC_AUTH_UNIX;
dprintk("--> nfs_d_automount()\n");
@ -255,13 +252,8 @@ struct vfsmount *nfs_d_automount(struct path *path)
err = server->nfs_client->rpc_ops->lookup(server->client, parent->d_inode,
&path->dentry->d_name,
fh, fattr);
if (err == -EPERM) {
flavor = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr);
if (flavor < 0)
err = flavor;
else
err = 0;
}
if (err == -EPERM && NFS_PROTO(parent->d_inode)->secinfo != NULL)
err = nfs_lookup_with_sec(server, parent, path->dentry, path, fh, fattr, &flavor);
dput(parent);
if (err != 0) {
mnt = ERR_PTR(err);

View file

@ -2204,8 +2204,6 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
goto out;
}
ret = nfs4_lookup_root(server, fhandle, info);
if (ret < 0)
ret = -EAGAIN;
out:
return ret;
}
@ -2226,7 +2224,7 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
for (i = 0; i < len; i++) {
status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]);
if (status == 0)
if (status != -EPERM)
break;
}
if (status == 0)

View file

@ -442,7 +442,7 @@ EXPORT_SYMBOL(dquot_acquire);
*/
int dquot_commit(struct dquot *dquot)
{
int ret = 0, ret2 = 0;
int ret = 0;
struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
mutex_lock(&dqopt->dqio_mutex);
@ -454,15 +454,10 @@ int dquot_commit(struct dquot *dquot)
spin_unlock(&dq_list_lock);
/* Inactive dquot can be only if there was error during read/init
* => we have better not writing it */
if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
if (info_dirty(&dqopt->info[dquot->dq_type])) {
ret2 = dqopt->ops[dquot->dq_type]->write_file_info(
dquot->dq_sb, dquot->dq_type);
}
if (ret >= 0)
ret = ret2;
}
else
ret = -EIO;
out_sem:
mutex_unlock(&dqopt->dqio_mutex);
return ret;

View file

@ -2711,8 +2711,8 @@ SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
/**
* sys_rt_sigaction - alter an action taken by a process
* @sig: signal to be sent
* @act: the thread group ID of the thread
* @oact: the PID of the thread
* @act: new sigaction
* @oact: used to save the previous sigaction
* @sigsetsize: size of sigset_t type
*/
SYSCALL_DEFINE4(rt_sigaction, int, sig,

View file

@ -427,7 +427,7 @@ static int
context_derive_keys_rc4(struct krb5_ctx *ctx)
{
struct crypto_hash *hmac;
static const char sigkeyconstant[] = "signaturekey";
char sigkeyconstant[] = "signaturekey";
int slen = strlen(sigkeyconstant) + 1; /* include null terminator */
struct hash_desc desc;
struct scatterlist sg[1];