aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Rees <[email protected]>2012-04-09 22:33:39 -0400
committerTrond Myklebust <[email protected]>2012-04-26 12:23:23 -0400
commit10bd295a0b6488ebe634b72a11d8986bd3af3819 (patch)
tree8c9fec0f15e1a64fe1d1aa58b42c61d8b2108666
parente5265a0c587423bbd21a6b39a572cecff16b9346 (diff)
fix page number calculation bug for block layout decode buffer
Signed-off-by: Jim Rees <[email protected]> Suggested-by: Andy Adamson <[email protected]> Suggested-by: Fred Isaman <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
-rw-r--r--fs/nfs/blocklayout/blocklayout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 9c94297bb70e..7f6a23f0244e 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -38,6 +38,8 @@
#include <linux/buffer_head.h> /* various write calls */
#include <linux/prefetch.h>
+#include "../pnfs.h"
+#include "../internal.h"
#include "blocklayout.h"
#define NFSDBG_FACILITY NFSDBG_PNFS_LD
@@ -868,7 +870,7 @@ nfs4_blk_get_deviceinfo(struct nfs_server *server, const struct nfs_fh *fh,
* GETDEVICEINFO's maxcount
*/
max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
- max_pages = max_resp_sz >> PAGE_SHIFT;
+ max_pages = nfs_page_array_len(0, max_resp_sz);
dprintk("%s max_resp_sz %u max_pages %d\n",
__func__, max_resp_sz, max_pages);