~ubuntu-branches/ubuntu/saucy/linux-ti-omap4/saucy-proposed

« back to all changes in this revision

Viewing changes to fs/nfs/objlayout/objlayout.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Stefan Bader, Upstream Kernel Changes
  • Date: 2012-08-15 17:17:43 UTC
  • Revision ID: package-import@ubuntu.com-20120815171743-h5wnuf51xe7pvdid
Tags: 3.5.0-207.13
[ Paolo Pisati ]

* Start new release

[ Stefan Bader ]

* (config) Enable getabis to use local package copies

[ Upstream Kernel Changes ]

* fixup: gargabe collect iva_seq[0|1] init
* [Config] enable all SND_OMAP_SOC_*s
* fixup: cm2xxx_3xxx.o is needed for omap2_cm_read|write_reg
* fixup: add some snd_soc_dai* helper functions
* fixup: s/snd_soc_dpcm_params/snd_soc_dpcm/g
* fixup: typo, no_host_mode and useless SDP4430 init
* fixup: enable again aess hwmod

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
        if (status >= 0)
259
259
                rdata->res.count = status;
260
260
        else
261
 
                rdata->pnfs_error = status;
 
261
                rdata->header->pnfs_error = status;
262
262
        objlayout_iodone(oir);
263
263
        /* must not use oir after this point */
264
264
 
279
279
enum pnfs_try_status
280
280
objlayout_read_pagelist(struct nfs_read_data *rdata)
281
281
{
 
282
        struct nfs_pgio_header *hdr = rdata->header;
 
283
        struct inode *inode = hdr->inode;
282
284
        loff_t offset = rdata->args.offset;
283
285
        size_t count = rdata->args.count;
284
286
        int err;
285
287
        loff_t eof;
286
288
 
287
 
        eof = i_size_read(rdata->inode);
 
289
        eof = i_size_read(inode);
288
290
        if (unlikely(offset + count > eof)) {
289
291
                if (offset >= eof) {
290
292
                        err = 0;
297
299
        }
298
300
 
299
301
        rdata->res.eof = (offset + count) >= eof;
300
 
        _fix_verify_io_params(rdata->lseg, &rdata->args.pages,
 
302
        _fix_verify_io_params(hdr->lseg, &rdata->args.pages,
301
303
                              &rdata->args.pgbase,
302
304
                              rdata->args.offset, rdata->args.count);
303
305
 
304
306
        dprintk("%s: inode(%lx) offset 0x%llx count 0x%Zx eof=%d\n",
305
 
                __func__, rdata->inode->i_ino, offset, count, rdata->res.eof);
 
307
                __func__, inode->i_ino, offset, count, rdata->res.eof);
306
308
 
307
309
        err = objio_read_pagelist(rdata);
308
310
 out:
309
311
        if (unlikely(err)) {
310
 
                rdata->pnfs_error = err;
 
312
                hdr->pnfs_error = err;
311
313
                dprintk("%s: Returned Error %d\n", __func__, err);
312
314
                return PNFS_NOT_ATTEMPTED;
313
315
        }
340
342
                wdata->res.count = status;
341
343
                wdata->verf.committed = oir->committed;
342
344
        } else {
343
 
                wdata->pnfs_error = status;
 
345
                wdata->header->pnfs_error = status;
344
346
        }
345
347
        objlayout_iodone(oir);
346
348
        /* must not use oir after this point */
363
365
objlayout_write_pagelist(struct nfs_write_data *wdata,
364
366
                         int how)
365
367
{
 
368
        struct nfs_pgio_header *hdr = wdata->header;
366
369
        int err;
367
370
 
368
 
        _fix_verify_io_params(wdata->lseg, &wdata->args.pages,
 
371
        _fix_verify_io_params(hdr->lseg, &wdata->args.pages,
369
372
                              &wdata->args.pgbase,
370
373
                              wdata->args.offset, wdata->args.count);
371
374
 
372
375
        err = objio_write_pagelist(wdata, how);
373
376
        if (unlikely(err)) {
374
 
                wdata->pnfs_error = err;
 
377
                hdr->pnfs_error = err;
375
378
                dprintk("%s: Returned Error %d\n", __func__, err);
376
379
                return PNFS_NOT_ATTEMPTED;
377
380
        }