diff options
Diffstat (limited to 'ext2fs/truncate.c')
-rw-r--r-- | ext2fs/truncate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext2fs/truncate.c b/ext2fs/truncate.c index 6efe1a57..63cc7340 100644 --- a/ext2fs/truncate.c +++ b/ext2fs/truncate.c @@ -277,9 +277,10 @@ diskfs_truncate (struct node *node, off_t length) if (length >= node->dn_stat.st_size) return 0; - if (S_ISLNK (node->dn_stat.st_mode) && !node->dn_stat.st_blocks) - /* An in-inode symlink; there aren't really any blocks allocated, so - just frob the size. */ + if (! node->dn_stat.st_blocks) + /* There aren't really any blocks allocated, so just frob the size. This + is true for fast symlinks, and also apparently for some device nodes + in linux. */ { node->dn_stat.st_size = length; node->dn_set_mtime = 1; |