Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254593
b: refs/heads/master
c: 1d08382
h: refs/heads/master
i:
  254591: b32d156
v: v3
  • Loading branch information
Samuel Ortiz committed Jul 5, 2011
1 parent a993df7 commit caa472f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 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: 121782a248f11c63c7c0fc78d4a68a54e99ee37d
refs/heads/master: 1d08382a0e8a272fed9517a1b39ae6be634a77d5
3 changes: 2 additions & 1 deletion trunk/drivers/input/keyboard/pmic8xxx-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ static void pmic8xxx_kp_close(struct input_dev *dev)
*/
static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev)
{
const struct pm8xxx_keypad_platform_data *pdata = mfd_get_data(pdev);
const struct pm8xxx_keypad_platform_data *pdata =
dev_get_platdata(&pdev->dev);
const struct matrix_keymap_data *keymap_data;
struct pmic8xxx_kp *kp;
int rc;
Expand Down
14 changes: 8 additions & 6 deletions trunk/fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ static int striped_read(struct inode *inode,
struct ceph_inode_info *ci = ceph_inode(inode);
u64 pos, this_len;
int io_align, page_align;
int page_off = off & ~PAGE_CACHE_MASK; /* first byte's offset in page */
int left, pages_left;
int read;
struct page **page_pos;
Expand Down Expand Up @@ -325,11 +326,12 @@ static int striped_read(struct inode *inode,
ret, hit_stripe ? " HITSTRIPE" : "", was_short ? " SHORT" : "");

if (ret > 0) {
int didpages = (page_align + ret) >> PAGE_CACHE_SHIFT;
int didpages =
((pos & ~PAGE_CACHE_MASK) + ret) >> PAGE_CACHE_SHIFT;

if (read < pos - off) {
dout(" zero gap %llu to %llu\n", off + read, pos);
ceph_zero_page_vector_range(page_align + read,
ceph_zero_page_vector_range(page_off + read,
pos - off - read, pages);
}
pos += ret;
Expand All @@ -354,7 +356,7 @@ static int striped_read(struct inode *inode,
left = inode->i_size - pos;

dout("zero tail %d\n", left);
ceph_zero_page_vector_range(page_align + read, left,
ceph_zero_page_vector_range(page_off + read, left,
pages);
read += left;
}
Expand Down Expand Up @@ -476,6 +478,9 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
else
pos = *offset;

io_align = pos & ~PAGE_MASK;
buf_align = (unsigned long)data & ~PAGE_MASK;

ret = filemap_write_and_wait_range(inode->i_mapping, pos, pos + left);
if (ret < 0)
return ret;
Expand All @@ -499,8 +504,6 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
* boundary. this isn't atomic, unfortunately. :(
*/
more:
io_align = pos & ~PAGE_MASK;
buf_align = (unsigned long)data & ~PAGE_MASK;
len = left;
if (file->f_flags & O_DIRECT) {
/* write from beginning of first page, regardless of
Expand Down Expand Up @@ -590,7 +593,6 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
pos += len;
written += len;
left -= len;
data += written;
if (left)
goto more;

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
out_put_hidden_dir:
iput(sbi->hidden_dir);
out_put_root:
iput(root);
iput(sbi->alloc_file);
out_put_alloc_file:
iput(sbi->alloc_file);
out_close_cat_tree:
Expand Down
7 changes: 2 additions & 5 deletions trunk/fs/hfsplus/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
{
DECLARE_COMPLETION_ONSTACK(wait);
struct bio *bio;
int ret = 0;

bio = bio_alloc(GFP_NOIO, 1);
bio->bi_sector = sector;
Expand All @@ -55,10 +54,8 @@ int hfsplus_submit_bio(struct block_device *bdev, sector_t sector,
wait_for_completion(&wait);

if (!bio_flagged(bio, BIO_UPTODATE))
ret = -EIO;

bio_put(bio);
return ret;
return -EIO;
return 0;
}

static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
Expand Down
10 changes: 4 additions & 6 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,8 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
calc_layout(osdc, vino, layout, off, plen, req, ops);
req->r_file_layout = *layout; /* keep a copy */

/* in case it differs from natural (file) alignment that
calc_layout filled in for us */
req->r_num_pages = calc_pages_for(page_align, *plen);
/* in case it differs from natural alignment that calc_layout
filled in for us */
req->r_page_alignment = page_align;

ceph_osdc_build_request(req, off, plen, ops,
Expand Down Expand Up @@ -2028,9 +2027,8 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
int want = calc_pages_for(req->r_page_alignment, data_len);

if (unlikely(req->r_num_pages < want)) {
pr_warning("tid %lld reply has %d bytes %d pages, we"
" had only %d pages ready\n", tid, data_len,
want, req->r_num_pages);
pr_warning("tid %lld reply %d > expected %d pages\n",
tid, want, m->nr_pages);
*skip = 1;
ceph_msg_put(m);
m = NULL;
Expand Down

0 comments on commit caa472f

Please sign in to comment.