lkml.org 
[lkml]   [2018]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 04/11] vfs: add errseq_t pointer to __sync_filesystem
Date
From: Jeff Layton <jlayton@redhat.com>

...and pass that to the sync_fs operation. Also, have __sync_filesystem
return the error from sync_fs (if there is one).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/sync.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/sync.c b/fs/sync.c
index fc0b7bd51ae6..c876fa414cae 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -28,14 +28,16 @@
* wait == 1 case since in that case write_inode() functions do
* sync_dirty_buffer() and thus effectively write one block at a time.
*/
-static int __sync_filesystem(struct super_block *sb, int wait)
+static int __sync_filesystem(struct super_block *sb, int wait, errseq_t *since)
{
+ int ret = 0;
+
if (wait)
sync_inodes_sb(sb);
else
writeback_inodes_sb(sb, WB_REASON_SYNC);

- return call_sync_fs(sb, wait, NULL);
+ return call_sync_fs(sb, wait, since);
}

/*
@@ -59,10 +61,10 @@ int sync_filesystem(struct super_block *sb, errseq_t *since)
if (sb_rdonly(sb))
return 0;

- ret = __sync_filesystem(sb, 0);
+ ret = __sync_filesystem(sb, 0, since);
if (ret < 0)
return ret;
- return __sync_filesystem(sb, 1);
+ return __sync_filesystem(sb, 1, since);
}
EXPORT_SYMBOL(sync_filesystem);

--
2.17.0
\
 
 \ /
  Last update: 2018-05-18 14:35    [W:0.071 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site