filesys: use BLKOFF
authorAlan Cox <alan@linux.intel.com>
Sat, 21 Feb 2015 00:32:22 +0000 (00:32 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 21 Feb 2015 00:32:22 +0000 (00:32 +0000)
Kernel/filesys.c

index d583bfa..33b5016 100644 (file)
@@ -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
 }