Commit 547e64bd authored by Cheng Nie's avatar Cheng Nie Committed by Theodore Ts'o

ext4: fix the comment of ext4_map_blocks()/ext4_ext_map_blocks()

this comment of ext4_map_blocks()/ext4_ext_map_blocks() need
update after commit c2177057("ext4: Define a new set of
flags for ext4_get_blocks()").
Signed-off-by: default avatarCheng Nie <niecheng1@uniontech.com>
Link: https://lore.kernel.org/r/20240118062511.28276-1-niecheng1@uniontech.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 4b55d343
...@@ -4111,10 +4111,10 @@ static ext4_lblk_t ext4_ext_determine_insert_hole(struct inode *inode, ...@@ -4111,10 +4111,10 @@ static ext4_lblk_t ext4_ext_determine_insert_hole(struct inode *inode,
* *
* Need to be called with * Need to be called with
* down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block * down_read(&EXT4_I(inode)->i_data_sem) if not allocating file system block
* (ie, create is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem) * (ie, flags is zero). Otherwise down_write(&EXT4_I(inode)->i_data_sem)
* *
* return > 0, number of blocks already mapped/allocated * return > 0, number of blocks already mapped/allocated
* if create == 0 and these are pre-allocated blocks * if flags doesn't contain EXT4_GET_BLOCKS_CREATE and these are pre-allocated blocks
* buffer head is unmapped * buffer head is unmapped
* otherwise blocks are mapped * otherwise blocks are mapped
* *
...@@ -4218,7 +4218,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, ...@@ -4218,7 +4218,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
/* /*
* requested block isn't allocated yet; * requested block isn't allocated yet;
* we couldn't try to create block if create flag is zero * we couldn't try to create block if flags doesn't contain EXT4_GET_BLOCKS_CREATE
*/ */
if ((flags & EXT4_GET_BLOCKS_CREATE) == 0) { if ((flags & EXT4_GET_BLOCKS_CREATE) == 0) {
ext4_lblk_t len; ext4_lblk_t len;
......
...@@ -465,9 +465,10 @@ static void ext4_map_blocks_es_recheck(handle_t *handle, ...@@ -465,9 +465,10 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
* Otherwise, call with ext4_ind_map_blocks() to handle indirect mapping * Otherwise, call with ext4_ind_map_blocks() to handle indirect mapping
* based files * based files
* *
* On success, it returns the number of blocks being mapped or allocated. if * On success, it returns the number of blocks being mapped or allocated.
* create==0 and the blocks are pre-allocated and unwritten, the resulting @map * If flags doesn't contain EXT4_GET_BLOCKS_CREATE the blocks are
* is marked as unwritten. If the create == 1, it will mark @map as mapped. * pre-allocated and unwritten, the resulting @map is marked as unwritten.
* If the flags contain EXT4_GET_BLOCKS_CREATE, it will mark @map as mapped.
* *
* It returns 0 if plain look up failed (blocks have not been allocated), in * It returns 0 if plain look up failed (blocks have not been allocated), in
* that case, @map is returned as unmapped but we still do fill map->m_len to * that case, @map is returned as unmapped but we still do fill map->m_len to
...@@ -589,8 +590,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, ...@@ -589,8 +590,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
* Returns if the blocks have already allocated * Returns if the blocks have already allocated
* *
* Note that if blocks have been preallocated * Note that if blocks have been preallocated
* ext4_ext_get_block() returns the create = 0 * ext4_ext_map_blocks() returns with buffer head unmapped
* with buffer head unmapped.
*/ */
if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED)
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment