]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'linux-next' of git://git.open-osd.org/linux-open-osd
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Oct 2012 06:54:27 +0000 (15:54 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Oct 2012 06:54:27 +0000 (15:54 +0900)
Pull exofs update from Boaz Harrosh:
 "Just three one liners"

* 'linux-next' of git://git.open-osd.org/linux-open-osd:
  pnfs_osd_xdr: Remove unused #include from pnfs_osd_xdr.h
  ore: signedness bug in _sp2d_min_pg()
  exofs: check for allocation failure in uri_store()

fs/exofs/ore_raid.c
fs/exofs/sys.c
include/linux/pnfs_osd_xdr.h

index 5f376d14fdcc3c0d9791fce5f2951d35b54c778b..b963f38ac298e82404befa6265c171aca4584aba 100644 (file)
@@ -203,7 +203,7 @@ static unsigned _sp2d_min_pg(struct __stripe_pages_2d *sp2d)
 
 static unsigned _sp2d_max_pg(struct __stripe_pages_2d *sp2d)
 {
-       unsigned p;
+       int p;
 
        for (p = sp2d->pages_in_unit - 1; p >= 0; --p) {
                struct __1_page_stripe *_1ps = &sp2d->_1p_stripes[p];
index 5a7b691e748bdcda66746098d42194cb4682f7e5..1b4f2f95fc3797880ed7a7c6eab82b086ca11e4e 100644 (file)
@@ -80,8 +80,13 @@ static ssize_t uri_show(struct exofs_dev *edp, char *buf)
 
 static ssize_t uri_store(struct exofs_dev *edp, const char *buf, size_t len)
 {
+       uint8_t *new_uri;
+
        edp->urilen = strlen(buf) + 1;
-       edp->uri = krealloc(edp->uri, edp->urilen, GFP_KERNEL);
+       new_uri = krealloc(edp->uri, edp->urilen, GFP_KERNEL);
+       if (new_uri == NULL)
+               return -ENOMEM;
+       edp->uri = new_uri;
        strncpy(edp->uri, buf, edp->urilen);
        return edp->urilen;
 }
index 435dd5fa7453144b459253d1cb339f981ef7b5f7..fe25876c1a5d6035551cba79e1d0caf6daacda84 100644 (file)
@@ -40,7 +40,6 @@
 #define __PNFS_OSD_XDR_H__
 
 #include <linux/nfs_fs.h>
-#include <linux/nfs_page.h>
 
 /*
  * draft-ietf-nfsv4-minorversion-22