archive mirror
 help / color / mirror / Atom feed
From: Steve French <>
To: Andrew Morton <>
Subject: Re: do_div considered harmful
Date: Mon, 04 Aug 2003 00:31:17 -0500	[thread overview]
Message-ID: <> (raw)

I have made a change to fix this in fs/cifs/inode.c and a similar 
problem in fs/cifs/file.c
(and a change to fs/cifs/cifsfs.c to better match the blocksize bits and 
blocksize default).
It is (version 0.8.7 of the cifs vfs) in 
bk:// and I am testing it now.

 >> Similarly, I find in fs/cifs/inode.c>
 >>          inode->i_blocks = do_div(findData.NumOfBytes, 
 >This should be
 >        int blocksize = 1 << inode->i_blkbits;
 >         inode->i_blocks = (findData.NumOfBytes + blocksize - 1)
 >                                    >> inode->i_blkbits;

             reply	other threads:[~2003-08-04  5:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04  5:31 Steve French [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-04  9:46 do_div considered harmful Andries.Brouwer
2003-08-04  2:03 Andries.Brouwer
2003-08-04  2:29 ` Andrew Morton
2003-08-04  5:54 ` Linus Torvalds

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:

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

  git send-email \ \ \ \ \ \ \

* 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).