Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201036
b: refs/heads/master
c: 58c84ed
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Jul 16, 2010
1 parent 00d68ed commit 13495b0
Show file tree
Hide file tree
Showing 35 changed files with 306 additions and 574 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: bea9a6d239cb2aa2ced4dcb0a05e1827ce61fa3d
refs/heads/master: 58c84eda07560a6b75b03e8d3b26d6eddfc14011
1 change: 1 addition & 0 deletions trunk/arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ static void __init pcibios_allocate_resources(int pass)
idx, r, disabled, pass);
if (pci_claim_resource(dev, idx) < 0) {
/* We'll assign a new address later */
dev->fw_addr[idx] = r->start;
r->end -= r->start;
r->start = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/crypto/ablkcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static inline int ablkcipher_next_slow(struct ablkcipher_request *req,

p = kmalloc(n, GFP_ATOMIC);
if (!p)
return ablkcipher_walk_done(req, walk, -ENOMEM);
ablkcipher_walk_done(req, walk, -ENOMEM);

base = p + 1;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
page = read_cache_page_gfp(mapping, i,
GFP_HIGHUSER |
__GFP_COLD |
__GFP_RECLAIMABLE |
gfpmask);
if (IS_ERR(page))
goto err_pages;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ static int synaptics_resolution(struct psmouse *psmouse)
unsigned char max[3];

if (SYN_ID_MAJOR(priv->identity) < 4)
return 0;

if (synaptics_send_cmd(psmouse, SYN_QUE_RESOLUTION, res) == 0) {
if (res[0] != 0 && (res[1] & 0x80) && res[2] != 0) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/touchscreen/w90p910_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int __devinit w90x900ts_probe(struct platform_device *pdev)
w90p910_ts->state = TS_IDLE;
spin_lock_init(&w90p910_ts->lock);
setup_timer(&w90p910_ts->timer, w90p910_check_pen_up,
(unsigned long)w90p910_ts);
(unsigned long)&w90p910_ts);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
Expand Down
32 changes: 32 additions & 0 deletions trunk/drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,38 @@ static int __pci_assign_resource(struct pci_bus *bus, struct pci_dev *dev,
pcibios_align_resource, dev);
}

if (ret < 0 && dev->fw_addr[resno]) {
struct resource *root, *conflict;
resource_size_t start, end;

/*
* If we failed to assign anything, let's try the address
* where firmware left it. That at least has a chance of
* working, which is better than just leaving it disabled.
*/

if (res->flags & IORESOURCE_IO)
root = &ioport_resource;
else
root = &iomem_resource;

start = res->start;
end = res->end;
res->start = dev->fw_addr[resno];
res->end = res->start + size - 1;
dev_info(&dev->dev, "BAR %d: trying firmware assignment %pR\n",
resno, res);
conflict = request_resource_conflict(root, res);
if (conflict) {
dev_info(&dev->dev,
"BAR %d: %pR conflicts with %s %pR\n", resno,
res, conflict->name, conflict);
res->start = start;
res->end = end;
} else
ret = 0;
}

if (!ret) {
res->flags &= ~IORESOURCE_STARTALIGN;
dev_info(&dev->dev, "BAR %d: assigned %pR\n", resno, res);
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ static int trunc_start(struct gfs2_inode *ip, u64 size)

if (gfs2_is_stuffed(ip)) {
u64 dsize = size + sizeof(struct gfs2_inode);
ip->i_disksize = size;
ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(ip, dibh->b_data);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static int gfs2_dirent_find_space(const struct gfs2_dirent *dent,
unsigned totlen = be16_to_cpu(dent->de_rec_len);

if (gfs2_dirent_sentinel(dent))
actual = 0;
actual = GFS2_DIRENT_SIZE(0);
if (totlen - actual >= required)
return 1;
return 0;
Expand Down
10 changes: 0 additions & 10 deletions trunk/fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,18 +706,8 @@ static void glock_work_func(struct work_struct *work)
{
unsigned long delay = 0;
struct gfs2_glock *gl = container_of(work, struct gfs2_glock, gl_work.work);
struct gfs2_holder *gh;
int drop_ref = 0;

if (unlikely(test_bit(GLF_FROZEN, &gl->gl_flags))) {
spin_lock(&gl->gl_spin);
gh = find_first_waiter(gl);
if (gh && (gh->gh_flags & LM_FLAG_NOEXP) &&
test_and_clear_bit(GLF_FROZEN, &gl->gl_flags))
set_bit(GLF_REPLY_PENDING, &gl->gl_flags);
spin_unlock(&gl->gl_spin);
}

if (test_and_clear_bit(GLF_REPLY_PENDING, &gl->gl_flags)) {
finish_xmote(gl, gl->gl_reply);
drop_ref = 1;
Expand Down
12 changes: 4 additions & 8 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
{
struct inode *inode;
struct gfs2_inode *ip;
struct gfs2_glock *io_gl = NULL;
struct gfs2_glock *io_gl;
int error;

inode = gfs2_iget(sb, no_addr);
Expand Down Expand Up @@ -198,7 +198,6 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
ip->i_iopen_gh.gh_gl->gl_object = ip;

gfs2_glock_put(io_gl);
io_gl = NULL;

if ((type == DT_UNKNOWN) && (no_formal_ino == 0))
goto gfs2_nfsbypass;
Expand Down Expand Up @@ -229,8 +228,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
fail_glock:
gfs2_glock_dq(&ip->i_iopen_gh);
fail_iopen:
if (io_gl)
gfs2_glock_put(io_gl);
gfs2_glock_put(io_gl);
fail_put:
if (inode->i_state & I_NEW)
ip->i_gl->gl_object = NULL;
Expand Down Expand Up @@ -258,7 +256,7 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)
{
struct gfs2_sbd *sdp;
struct gfs2_inode *ip;
struct gfs2_glock *io_gl = NULL;
struct gfs2_glock *io_gl;
int error;
struct gfs2_holder gh;
struct inode *inode;
Expand Down Expand Up @@ -295,7 +293,6 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)

ip->i_iopen_gh.gh_gl->gl_object = ip;
gfs2_glock_put(io_gl);
io_gl = NULL;

inode->i_mode = DT2IF(DT_UNKNOWN);

Expand All @@ -322,8 +319,7 @@ void gfs2_process_unlinked_inode(struct super_block *sb, u64 no_addr)
fail_glock:
gfs2_glock_dq(&ip->i_iopen_gh);
fail_iopen:
if (io_gl)
gfs2_glock_put(io_gl);
gfs2_glock_put(io_gl);
fail_put:
ip->i_gl->gl_object = NULL;
gfs2_glock_put(ip->i_gl);
Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/gfs2/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,10 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
if (!buffer_mapped(bh))
goto unlock_out;
/* If it's a newly allocated disk block for quota, zero it */
if (buffer_new(bh))
zero_user(page, pos - blocksize, bh->b_size);
if (buffer_new(bh)) {
memset(bh->b_data, 0, bh->b_size);
set_buffer_uptodate(bh);
}
}

if (PageUptodate(page))
Expand All @@ -721,7 +723,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,

/* If quota straddles page boundary, we need to update the rest of the
* quota at the beginning of the next page */
if ((offset + sizeof(struct gfs2_quota)) > PAGE_CACHE_SIZE) {
if (offset != 0) { /* first page, offset is closer to PAGE_CACHE_SIZE */
ptr = ptr + nbytes;
nbytes = sizeof(struct gfs2_quota) - nbytes;
offset = 0;
Expand Down
15 changes: 8 additions & 7 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
struct page *new_page;
unsigned int new_offset;
struct buffer_head *bh_in = jh2bh(jh_in);
struct jbd2_buffer_trigger_type *triggers;
journal_t *journal = transaction->t_journal;

/*
Expand Down Expand Up @@ -327,21 +328,21 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
done_copy_out = 1;
new_page = virt_to_page(jh_in->b_frozen_data);
new_offset = offset_in_page(jh_in->b_frozen_data);
triggers = jh_in->b_frozen_triggers;
} else {
new_page = jh2bh(jh_in)->b_page;
new_offset = offset_in_page(jh2bh(jh_in)->b_data);
triggers = jh_in->b_triggers;
}

mapped_data = kmap_atomic(new_page, KM_USER0);
/*
* Fire data frozen trigger if data already wasn't frozen. Do this
* before checking for escaping, as the trigger may modify the magic
* offset. If a copy-out happens afterwards, it will have the correct
* data in the buffer.
* Fire any commit trigger. Do this before checking for escaping,
* as the trigger may modify the magic offset. If a copy-out
* happens afterwards, it will have the correct data in the buffer.
*/
if (!done_copy_out)
jbd2_buffer_frozen_trigger(jh_in, mapped_data + new_offset,
jh_in->b_triggers);
jbd2_buffer_commit_trigger(jh_in, mapped_data + new_offset,
triggers);

/*
* Check for escaping
Expand Down
9 changes: 3 additions & 6 deletions trunk/fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,6 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
page = jh2bh(jh)->b_page;
offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK;
source = kmap_atomic(page, KM_USER0);
/* Fire data frozen trigger just before we copy the data */
jbd2_buffer_frozen_trigger(jh, source + offset,
jh->b_triggers);
memcpy(jh->b_frozen_data, source+offset, jh2bh(jh)->b_size);
kunmap_atomic(source, KM_USER0);

Expand Down Expand Up @@ -966,15 +963,15 @@ void jbd2_journal_set_triggers(struct buffer_head *bh,
jh->b_triggers = type;
}

void jbd2_buffer_frozen_trigger(struct journal_head *jh, void *mapped_data,
void jbd2_buffer_commit_trigger(struct journal_head *jh, void *mapped_data,
struct jbd2_buffer_trigger_type *triggers)
{
struct buffer_head *bh = jh2bh(jh);

if (!triggers || !triggers->t_frozen)
if (!triggers || !triggers->t_commit)
return;

triggers->t_frozen(triggers, bh, mapped_data, bh->b_size);
triggers->t_commit(triggers, bh, mapped_data, bh->b_size);
}

void jbd2_buffer_abort_trigger(struct journal_head *jh,
Expand Down
Loading

0 comments on commit 13495b0

Please sign in to comment.