Skip to content

Commit 1044d59

Browse files
fdmananakdave
authored andcommitted
btrfs: update function comment for btrfs_check_nocow_lock()
The documentation for the @nowait parameter is missing, so add it. The @nowait parameter was added in commit 80f9d24 ("btrfs: make btrfs_check_nocow_lock nowait compatible"), which forgot to update the function comment. Reviewed-by: Boris Burkov <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 863b9df commit 1044d59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/btrfs/file.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ lock_and_cleanup_extent_if_need(struct btrfs_inode *inode, struct folio *folio,
962962
* @pos: File offset.
963963
* @write_bytes: The length to write, will be updated to the nocow writeable
964964
* range.
965+
* @nowait: Indicate if we can block or not (non-blocking IO context).
965966
*
966967
* This function will flush ordered extents in the range to ensure proper
967968
* nocow checks.
@@ -970,7 +971,8 @@ lock_and_cleanup_extent_if_need(struct btrfs_inode *inode, struct folio *folio,
970971
* > 0 If we can nocow, and updates @write_bytes.
971972
* 0 If we can't do a nocow write.
972973
* -EAGAIN If we can't do a nocow write because snapshoting of the inode's
973-
* root is in progress.
974+
* root is in progress or because we are in a non-blocking IO
975+
* context and need to block (@nowait is true).
974976
* < 0 If an error happened.
975977
*
976978
* NOTE: Callers need to call btrfs_check_nocow_unlock() if we return > 0.

0 commit comments

Comments
 (0)