patch-2.4.10 linux/fs/romfs/inode.c
Next file: linux/fs/select.c
Previous file: linux/fs/reiserfs/tail_conversion.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Mon Sep 10 09:04:53 2001
- Orig file:
v2.4.9/linux/fs/romfs/inode.c
- Orig date:
Mon Aug 27 12:41:46 2001
diff -u --recursive --new-file v2.4.9/linux/fs/romfs/inode.c linux/fs/romfs/inode.c
@@ -124,7 +124,7 @@
"%s.\n", kdevname(dev));
goto out;
}
- if (romfs_checksum(rsb, min(int, sz, 512))) {
+ if (romfs_checksum(rsb, min_t(int, sz, 512))) {
printk ("romfs: bad initial checksum on dev "
"%s.\n", kdevname(dev));
goto out;
@@ -193,7 +193,7 @@
return -1; /* error */
avail = ROMBSIZE - (offset & ROMBMASK);
- maxsize = min(unsigned long, count, avail);
+ maxsize = min_t(unsigned long, count, avail);
res = strnlen(((char *)bh->b_data)+(offset&ROMBMASK), maxsize);
brelse(bh);
@@ -206,7 +206,7 @@
bh = bread(i->i_dev, offset>>ROMBSBITS, ROMBSIZE);
if (!bh)
return -1;
- maxsize = min(unsigned long, count - res, ROMBSIZE);
+ maxsize = min_t(unsigned long, count - res, ROMBSIZE);
avail = strnlen(bh->b_data, maxsize);
res += avail;
brelse(bh);
@@ -231,7 +231,7 @@
return -1; /* error */
avail = ROMBSIZE - (offset & ROMBMASK);
- maxsize = min(unsigned long, count, avail);
+ maxsize = min_t(unsigned long, count, avail);
memcpy(dest, ((char *)bh->b_data) + (offset & ROMBMASK), maxsize);
brelse(bh);
@@ -244,7 +244,7 @@
bh = bread(i->i_dev, offset>>ROMBSBITS, ROMBSIZE);
if (!bh)
return -1;
- maxsize = min(unsigned long, count - res, ROMBSIZE);
+ maxsize = min_t(unsigned long, count - res, ROMBSIZE);
memcpy(dest, bh->b_data, maxsize);
brelse(bh);
res += maxsize;
@@ -408,7 +408,7 @@
offset = page->index << PAGE_CACHE_SHIFT;
if (offset < inode->i_size) {
avail = inode->i_size-offset;
- readlen = min(unsigned long, avail, PAGE_SIZE);
+ readlen = min_t(unsigned long, avail, PAGE_SIZE);
if (romfs_copyfrom(inode, buf, inode->u.romfs_i.i_dataoffset+offset, readlen) == readlen) {
if (readlen < PAGE_SIZE) {
memset(buf + readlen,0,PAGE_SIZE-readlen);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)