Skip to content

Commit

Permalink
Apply editorial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jserv committed Jun 25, 2024
1 parent 52cf2a1 commit e76e0cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
}
}

/* return 'end' if it directs to valid block
* return 'boundary' if index is not found
* and eiblock has remaining space
/* Return 'end' if it directs to valid block.
* Return 'boundary' if index is not found and eiblock has remaining space
*/
end_block = index->extents[end].ee_block;
end_len = index->extents[end].ee_len;
Expand Down
5 changes: 2 additions & 3 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ static ssize_t simplefs_read(struct file *file,
struct simplefs_file_ei_block *ei_block =
(struct simplefs_file_ei_block *) bh->b_data;


if (pos + len > inode->i_size)
len = inode->i_size - pos;

Expand Down Expand Up @@ -469,10 +468,10 @@ const struct address_space_operations simplefs_aops = {
};

const struct file_operations simplefs_file_ops = {
.llseek = generic_file_llseek,
.owner = THIS_MODULE,
.fsync = generic_file_fsync,
.open = simplefs_open,
.read = simplefs_read,
.write = simplefs_write,
.llseek = generic_file_llseek,
.fsync = generic_file_fsync,
};
1 change: 1 addition & 0 deletions simplefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ extern uint32_t simplefs_ext_search(struct simplefs_file_ei_block *index,
/* Extract a simplefs_inode_info object from a VFS inode */
#define SIMPLEFS_INODE(inode) \
(container_of(inode, struct simplefs_inode_info, vfs_inode))

#endif /* __KERNEL__ */

#endif /* SIMPLEFS_H */

0 comments on commit e76e0cc

Please sign in to comment.