public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5540395
)
filesys: use BLKOFF
author
Alan Cox
<alan@linux.intel.com>
Sat, 21 Feb 2015 00:32:22 +0000
(
00:32
+0000)
committer
Alan Cox
<alan@linux.intel.com>
Sat, 21 Feb 2015 00:32:22 +0000
(
00:32
+0000)
Kernel/filesys.c
patch
|
blob
|
history
diff --git
a/Kernel/filesys.c
b/Kernel/filesys.c
index
d583bfa
..
33b5016
100644
(file)
--- a/
Kernel/filesys.c
+++ b/
Kernel/filesys.c
@@
-331,8
+331,8
@@
bool ch_link(inoptr wd, char *oldname, char *newname, inoptr nindex)
setftime(wd, A_TIME|M_TIME|C_TIME); /* Sets CDIRTY */
/* Update file length to next block */
- if(
wd->c_node.i_size & BLKMASK
)
- wd->c_node.i_size += BLKSIZE -
(wd->c_node.i_size & BLKMASK
);
+ if(
BLKOFF(wd->c_node.i_size)
)
+ wd->c_node.i_size += BLKSIZE -
BLKOFF(wd->c_node.i_size
);
return true; // success
}