[lkml]   [2003]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: do_div considered harmful
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;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.022 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site