From 15b934385b3d3adc9bca60f5f263038b44518f07 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Fri, 4 Sep 2009 11:12:01 -0700 Subject: [PATCH] --- yaml --- r: 157199 b: refs/heads/master c: 8379e7c46cc48f51197dd663fc6676f47f2a1e71 h: refs/heads/master i: 157197: d84f84c56ea0127a9d8e741778d4f917116bbb69 157195: 48ac2c03298dd0e9e02dfd0ff1c1abac1c156b3b 157191: e30994aef75ad30ec99514c6086a3bcbda3173c3 157183: c641daace804f499690a95d81781ae6f1b769295 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f4090b70b8b4..06415d7504a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1b08e75dff3dc18a88444803753e667bb1d126e +refs/heads/master: 8379e7c46cc48f51197dd663fc6676f47f2a1e71 diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index b401654011a2..8a1e61545f41 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -1747,8 +1747,8 @@ int ocfs2_write_begin_nolock(struct address_space *mapping, * we know zeros will only be needed in the first and/or last cluster. */ if (clusters_to_alloc || extents_to_split || - wc->w_desc[0].c_needs_zero || - wc->w_desc[wc->w_clen - 1].c_needs_zero) + (wc->w_clen && (wc->w_desc[0].c_needs_zero || + wc->w_desc[wc->w_clen - 1].c_needs_zero))) cluster_of_pages = 1; else cluster_of_pages = 0;