linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Tino Reichardt <list-jfs@mcmilk.de>
Subject: Re: linux-next: Tree for Sept 17 (jfs)
Date: Mon, 17 Sep 2012 11:50:51 -0500	[thread overview]
Message-ID: <505754EB.8060907@oracle.com> (raw)
In-Reply-To: <505745CF.8040202@xenotime.net>

On 09/17/2012 10:46 AM, Randy Dunlap wrote:
> On 09/17/2012 04:59 AM, Stephen Rothwell wrote:
> 
>> Hi all,
>>
>> OK, so this was a bad one :-(
>>
>> Changes since 201209014:
>>
>> New tree: jfs
>>
> 
> 
> 
> on i386:
> 
> modular build:
> ERROR: "__divdi3" [fs/jfs/jfs.ko] undefined!
> 
> or builtin:
> fs/built-in.o: In function `dbDiscardAG':
> (.text+0x12988b): undefined reference to `__divdi3'

Thanks Randy.

This should fix it. I'll integrate it back into the proper patch in the
jfs tree for the next pull.

jfs: fix i386 build error. Replace 64-bit division with do_div()

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index eb988a9..174feb6 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -1640,13 +1640,15 @@ s64 dbDiscardAG(struct inode *ip, int agno, s64 minlen)
 	} *totrim, *tt;
 
 	/* max blkno / nblocks pairs to trim */
-	int count = 0, range_cnt = 32 * 1024;
+	int count = 0, range_cnt;
 
 	/* prevent others from writing new stuff here, while trimming */
 	IWRITE_LOCK(ipbmap, RDWRLOCK_DMAP);
 
 	nblocks = bmp->db_agfree[agno];
-	range_cnt = min_t(int, range_cnt, nblocks / minlen + 1);
+	range_cnt = nblocks;
+	do_div(range_cnt, (int)minlen);
+	range_cnt = min(range_cnt + 1, 32 * 1024);
 	totrim = kmalloc(sizeof(struct range2trim) * range_cnt, GFP_NOFS);
 	if (totrim == NULL) {
 		jfs_error(bmp->db_ipbmap->i_sb,

  reply	other threads:[~2012-09-17 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 11:59 linux-next: Tree for Sept 17 Stephen Rothwell
2012-09-17 15:46 ` linux-next: Tree for Sept 17 (jfs) Randy Dunlap
2012-09-17 16:50   ` Dave Kleikamp [this message]
2012-09-17 20:10     ` Geert Uytterhoeven
2012-09-17 17:33 ` [PATCH -next] staging: fix csr printk format warning Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=505754EB.8060907@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=list-jfs@mcmilk.de \
    --cc=rdunlap@xenotime.net \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).