Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190819
b: refs/heads/master
c: be83567
h: refs/heads/master
i:
  190817: 3a5c074
  190815: 7d6eb99
v: v3
  • Loading branch information
Linus Torvalds committed May 13, 2010
1 parent b1a6cdd commit 7ced5be
Show file tree
Hide file tree
Showing 20 changed files with 140 additions and 176 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: 131c6c9eddfa252e376edb4aeff9c7fe1b96a798
refs/heads/master: be835674b55324c1abe973b15343c3663910c620
2 changes: 1 addition & 1 deletion trunk/arch/s390/kernel/head31.S
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ startup_continue:
_ehead:

#ifdef CONFIG_SHARED_KERNEL
.org 0x100000
.org 0x100000 - 0x11000 # head.o ends at 0x11000
#endif

#
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kernel/head64.S
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ startup_continue:
_ehead:

#ifdef CONFIG_SHARED_KERNEL
.org 0x100000
.org 0x100000 - 0x11000 # head.o ends at 0x11000
#endif

#
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/s390/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,

asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
{
long ret;
long ret = 0;

/* Do the secure computing check first. */
secure_computing(regs->gprs[2]);
Expand All @@ -649,7 +649,6 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
* The sysc_tracesys code in entry.S stored the system
* call number to gprs[2].
*/
ret = regs->gprs[2];
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
(tracehook_report_syscall_entry(regs) ||
regs->gprs[2] >= NR_syscalls)) {
Expand All @@ -671,7 +670,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
regs->gprs[2], regs->orig_gpr2,
regs->gprs[3], regs->gprs[4],
regs->gprs[5]);
return ret;
return ret ?: regs->gprs[2];
}

asmlinkage void do_syscall_trace_exit(struct pt_regs *regs)
Expand Down
114 changes: 2 additions & 112 deletions trunk/drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,131 +838,21 @@ static void pci_bus_dump_resources(struct pci_bus *bus)
}
}

static int __init pci_bus_get_depth(struct pci_bus *bus)
{
int depth = 0;
struct pci_dev *dev;

list_for_each_entry(dev, &bus->devices, bus_list) {
int ret;
struct pci_bus *b = dev->subordinate;
if (!b)
continue;

ret = pci_bus_get_depth(b);
if (ret + 1 > depth)
depth = ret + 1;
}

return depth;
}
static int __init pci_get_max_depth(void)
{
int depth = 0;
struct pci_bus *bus;

list_for_each_entry(bus, &pci_root_buses, node) {
int ret;

ret = pci_bus_get_depth(bus);
if (ret > depth)
depth = ret;
}

return depth;
}

/*
* first try will not touch pci bridge res
* second and later try will clear small leaf bridge res
* will stop till to the max deepth if can not find good one
*/
void __init
pci_assign_unassigned_resources(void)
{
struct pci_bus *bus;
int tried_times = 0;
enum release_type rel_type = leaf_only;
struct resource_list_x head, *list;
unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
IORESOURCE_PREFETCH;
unsigned long failed_type;
int max_depth = pci_get_max_depth();
int pci_try_num;

head.next = NULL;

pci_try_num = max_depth + 1;
printk(KERN_DEBUG "PCI: max bus depth: %d pci_try_num: %d\n",
max_depth, pci_try_num);

again:
/* Depth first, calculate sizes and alignments of all
subordinate buses. */
list_for_each_entry(bus, &pci_root_buses, node) {
pci_bus_size_bridges(bus);
}
/* Depth last, allocate resources and update the hardware. */
list_for_each_entry(bus, &pci_root_buses, node) {
__pci_bus_assign_resources(bus, &head);
}
tried_times++;

/* any device complain? */
if (!head.next)
goto enable_and_dump;
failed_type = 0;
for (list = head.next; list;) {
failed_type |= list->flags;
list = list->next;
}
/*
* io port are tight, don't try extra
* or if reach the limit, don't want to try more
*/
failed_type &= type_mask;
if ((failed_type == IORESOURCE_IO) || (tried_times >= pci_try_num)) {
free_failed_list(&head);
goto enable_and_dump;
}

printk(KERN_DEBUG "PCI: No. %d try to assign unassigned res\n",
tried_times + 1);

/* third times and later will not check if it is leaf */
if ((tried_times + 1) > 2)
rel_type = whole_subtree;

/*
* Try to release leaf bridge's resources that doesn't fit resource of
* child device under that bridge
*/
for (list = head.next; list;) {
bus = list->dev->bus;
pci_bus_release_bridge_resources(bus, list->flags & type_mask,
rel_type);
list = list->next;
}
/* restore size and flags */
for (list = head.next; list;) {
struct resource *res = list->res;

res->start = list->start;
res->end = list->end;
res->flags = list->flags;
if (list->dev->subordinate)
res->flags = 0;

list = list->next;
}
free_failed_list(&head);

goto again;

enable_and_dump:
/* Depth last, update the hardware. */
list_for_each_entry(bus, &pci_root_buses, node)
pci_bus_assign_resources(bus);
pci_enable_bridges(bus);
}

/* dump the resource on buses */
list_for_each_entry(bus, &pci_root_buses, node) {
Expand Down
17 changes: 10 additions & 7 deletions trunk/drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
*/
#define DASD_CHANQ_MAX_SIZE 4

#define DASD_SLEEPON_START_TAG (void *) 1
#define DASD_SLEEPON_END_TAG (void *) 2

/*
* SECTION: exported variables of dasd.c
*/
Expand Down Expand Up @@ -1472,7 +1475,10 @@ void dasd_add_request_tail(struct dasd_ccw_req *cqr)
*/
static void dasd_wakeup_cb(struct dasd_ccw_req *cqr, void *data)
{
wake_up((wait_queue_head_t *) data);
spin_lock_irq(get_ccwdev_lock(cqr->startdev->cdev));
cqr->callback_data = DASD_SLEEPON_END_TAG;
spin_unlock_irq(get_ccwdev_lock(cqr->startdev->cdev));
wake_up(&generic_waitq);
}

static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr)
Expand All @@ -1482,10 +1488,7 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr)

device = cqr->startdev;
spin_lock_irq(get_ccwdev_lock(device->cdev));
rc = ((cqr->status == DASD_CQR_DONE ||
cqr->status == DASD_CQR_NEED_ERP ||
cqr->status == DASD_CQR_TERMINATED) &&
list_empty(&cqr->devlist));
rc = (cqr->callback_data == DASD_SLEEPON_END_TAG);
spin_unlock_irq(get_ccwdev_lock(device->cdev));
return rc;
}
Expand Down Expand Up @@ -1573,7 +1576,7 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible)
wait_event(generic_waitq, !(device->stopped));

cqr->callback = dasd_wakeup_cb;
cqr->callback_data = (void *) &generic_waitq;
cqr->callback_data = DASD_SLEEPON_START_TAG;
dasd_add_request_tail(cqr);
if (interruptible) {
rc = wait_event_interruptible(
Expand Down Expand Up @@ -1652,7 +1655,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)
}

cqr->callback = dasd_wakeup_cb;
cqr->callback_data = (void *) &generic_waitq;
cqr->callback_data = DASD_SLEEPON_START_TAG;
cqr->status = DASD_CQR_QUEUED;
list_add(&cqr->devlist, &device->ccw_queue);

Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/cachefiles/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ static int cachefiles_check_cache_dir(struct cachefiles_cache *cache,
/*
* check the security details of the on-disk cache
* - must be called with security override in force
* - must return with a security override in force - even in the case of an
* error
*/
int cachefiles_determine_cache_security(struct cachefiles_cache *cache,
struct dentry *root,
Expand All @@ -99,6 +101,8 @@ int cachefiles_determine_cache_security(struct cachefiles_cache *cache,
* which create files */
ret = set_create_files_as(new, root->d_inode);
if (ret < 0) {
abort_creds(new);
cachefiles_begin_secure(cache, _saved_cred);
_leave(" = %d [cfa]", ret);
return ret;
}
Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ static void writepages_finish(struct ceph_osd_request *req,
int i;
struct ceph_snap_context *snapc = req->r_snapc;
struct address_space *mapping = inode->i_mapping;
struct writeback_control *wbc = req->r_wbc;
__s32 rc = -EIO;
u64 bytes = 0;
struct ceph_client *client = ceph_inode_to_client(inode);
Expand Down Expand Up @@ -546,10 +545,6 @@ static void writepages_finish(struct ceph_osd_request *req,
clear_bdi_congested(&client->backing_dev_info,
BLK_RW_ASYNC);

if (i >= wrote) {
dout("inode %p skipping page %p\n", inode, page);
wbc->pages_skipped++;
}
ceph_put_snap_context((void *)page->private);
page->private = 0;
ClearPagePrivate(page);
Expand Down Expand Up @@ -799,7 +794,6 @@ static int ceph_writepages_start(struct address_space *mapping,
alloc_page_vec(client, req);
req->r_callback = writepages_finish;
req->r_inode = inode;
req->r_wbc = wbc;
}

/* note position of first page in pvec */
Expand Down
19 changes: 12 additions & 7 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ static int __ceph_is_any_caps(struct ceph_inode_info *ci)
}

/*
* Remove a cap. Take steps to deal with a racing iterate_session_caps.
*
* caller should hold i_lock.
* caller will not hold session s_mutex if called from destroy_inode.
*/
Expand All @@ -866,15 +868,10 @@ void __ceph_remove_cap(struct ceph_cap *cap)
struct ceph_mds_session *session = cap->session;
struct ceph_inode_info *ci = cap->ci;
struct ceph_mds_client *mdsc = &ceph_client(ci->vfs_inode.i_sb)->mdsc;
int removed = 0;

dout("__ceph_remove_cap %p from %p\n", cap, &ci->vfs_inode);

/* remove from inode list */
rb_erase(&cap->ci_node, &ci->i_caps);
cap->ci = NULL;
if (ci->i_auth_cap == cap)
ci->i_auth_cap = NULL;

/* remove from session list */
spin_lock(&session->s_cap_lock);
if (session->s_cap_iterator == cap) {
Expand All @@ -885,10 +882,18 @@ void __ceph_remove_cap(struct ceph_cap *cap)
list_del_init(&cap->session_caps);
session->s_nr_caps--;
cap->session = NULL;
removed = 1;
}
/* protect backpointer with s_cap_lock: see iterate_session_caps */
cap->ci = NULL;
spin_unlock(&session->s_cap_lock);

if (cap->session == NULL)
/* remove from inode list */
rb_erase(&cap->ci_node, &ci->i_caps);
if (ci->i_auth_cap == cap)
ci->i_auth_cap = NULL;

if (removed)
ceph_put_cap(cap);

if (!__ceph_is_any_caps(ci) && ci->i_snap_realm) {
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ static int fill_inode(struct inode *inode,
__ceph_get_fmode(ci, cap_fmode);
spin_unlock(&inode->i_lock);
}
} else if (cap_fmode >= 0) {
pr_warning("mds issued no caps on %llx.%llx\n",
ceph_vinop(inode));
__ceph_get_fmode(ci, cap_fmode);
}

/* update delegation info? */
Expand Down
Loading

0 comments on commit 7ced5be

Please sign in to comment.