From caa472f51af55d08f25cdd5467531a3f76d6a4e3 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 8 Jun 2011 11:03:23 +0200 Subject: [PATCH] --- yaml --- r: 254593 b: refs/heads/master c: 1d08382a0e8a272fed9517a1b39ae6be634a77d5 h: refs/heads/master i: 254591: b32d156475c5192721db14ad232fea745227ae80 v: v3 --- [refs] | 2 +- trunk/drivers/input/keyboard/pmic8xxx-keypad.c | 3 ++- trunk/fs/ceph/file.c | 14 ++++++++------ trunk/fs/hfsplus/super.c | 2 +- trunk/fs/hfsplus/wrapper.c | 7 ++----- trunk/net/ceph/osd_client.c | 10 ++++------ 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index def68743da43..c5720b7c6d0f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 121782a248f11c63c7c0fc78d4a68a54e99ee37d +refs/heads/master: 1d08382a0e8a272fed9517a1b39ae6be634a77d5 diff --git a/trunk/drivers/input/keyboard/pmic8xxx-keypad.c b/trunk/drivers/input/keyboard/pmic8xxx-keypad.c index 40b02ae96f86..6229c3e8e78b 100644 --- a/trunk/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/trunk/drivers/input/keyboard/pmic8xxx-keypad.c @@ -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; diff --git a/trunk/fs/ceph/file.c b/trunk/fs/ceph/file.c index 4698a5c553dc..9542f07d0b93 100644 --- a/trunk/fs/ceph/file.c +++ b/trunk/fs/ceph/file.c @@ -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; @@ -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; @@ -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; } @@ -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; @@ -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 @@ -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; diff --git a/trunk/fs/hfsplus/super.c b/trunk/fs/hfsplus/super.c index 84a47b709f51..b49b55584c84 100644 --- a/trunk/fs/hfsplus/super.c +++ b/trunk/fs/hfsplus/super.c @@ -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: diff --git a/trunk/fs/hfsplus/wrapper.c b/trunk/fs/hfsplus/wrapper.c index 4ac88ff79aa6..3031d81f5f0f 100644 --- a/trunk/fs/hfsplus/wrapper.c +++ b/trunk/fs/hfsplus/wrapper.c @@ -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; @@ -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) diff --git a/trunk/net/ceph/osd_client.c b/trunk/net/ceph/osd_client.c index 7330c2757c0c..9cb627a4073a 100644 --- a/trunk/net/ceph/osd_client.c +++ b/trunk/net/ceph/osd_client.c @@ -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, @@ -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;