linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: use enum instead of constant value
@ 2017-12-05 10:35 Gu Jinxiang
  2017-12-05 17:35 ` David Sterba
  0 siblings, 1 reply; 9+ messages in thread
From: Gu Jinxiang @ 2017-12-05 10:35 UTC (permalink / raw)
  To: linux-btrfs

Use enum READA_BACK instead of value 1 to keep source robust.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
---
 fs/btrfs/free-space-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index a5e34de..a105629 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -1071,7 +1071,7 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans,
 	path = btrfs_alloc_path();
 	if (!path)
 		return -ENOMEM;
-	path->reada = 1;
+	path->reada = READA_BACK;
 
 	path2 = btrfs_alloc_path();
 	if (!path2) {
@@ -1577,7 +1577,7 @@ int load_free_space_tree(struct btrfs_caching_control *caching_ctl)
 	 */
 	path->skip_locking = 1;
 	path->search_commit_root = 1;
-	path->reada = 1;
+	path->reada = READA_BACK;
 
 	info = search_free_space_info(NULL, fs_info, block_group, path, 0);
 	if (IS_ERR(info)) {
-- 
1.9.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-02-06 14:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 10:35 [PATCH] btrfs: use enum instead of constant value Gu Jinxiang
2017-12-05 17:35 ` David Sterba
2018-01-11  6:59   ` [PATCH v2] " Gu Jinxiang
2018-01-11  7:24     ` Nikolay Borisov
2018-01-11  8:12       ` [PATCH v3 1/2] " Gu Jinxiang
2018-01-11  8:12         ` [PATCH v3 2/2] " Gu Jinxiang
2018-01-11  8:14           ` Nikolay Borisov
2018-01-11  8:14         ` [PATCH v3 1/2] " Nikolay Borisov
2018-02-06 14:54         ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).