NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages()
Subsystems (3)
PATCH 1/1 NFS: return -EAGAIN when skipped commit in nfs_commit_unstable_pages()
It's confusing to return success while redirtying the inode at the same time in ->write_inode(). Return -EAGAIN to indicate that we've not finished with this inode.
Impact: it's a cleanup, not bug fix.
--- fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/write.c +1 -1
@@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str {struct nfs_inode *nfsi =NFS_I (inode);int flags =FLUSH_SYNC ; -int ret =0 ; +int ret = -EAGAIN ;if (wbc->sync_mode ==WB_SYNC_NONE ) {/* Don't commit yet if this is a non-blocking flush and there
Quoted 15 lines · Wu Fengguang
It's confusing to return success while redirtying the inode at the same time in ->write_inode(). Return
-EAGAINto indicate that we've not finished with this inode.Impact: it's a cleanup, not bug fix.
CC Christoph Hellwig <[email protected]>Signed-off-by Wu Fengguang <[email protected]>--- fs/nfs/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/write.c static int nfs_commit_unstable_pages(str · line 1527
Quoted 8 lines
fs/nfs/write.c +1
-1@@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str {struct nfs_inode *nfsi =NFS_I (inode);int flags =FLUSH_SYNC ; -int ret =0 ; +int ret = -EAGAIN ;if (wbc->sync_mode ==WB_SYNC_NONE ) {/* Don't commit yet if this is a non-blocking flush and there
Looks good, but since this is a cleanup, I'm queueing it for 3.1 rather than pushing it in the regression-fixing window.
Cheers
Trond
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 7 lines
Quoted 7 lines
fs/nfs/write.c +1
-1@@ -1521,7 +1521,7 @@ static int nfs_commit_unstable_pages(str {struct nfs_inode *nfsi =NFS_I (inode);int flags =FLUSH_SYNC ; -int ret =0 ; +int ret = -EAGAIN ;
Quoted 5 lines
fs/nfs/write.c static int nfs_commit_unstable_pages(str · line 1527
Quoted 2 lines
fs/nfs/write.c +0
-0if (wbc->sync_mode ==WB_SYNC_NONE ) {/* Don't commit yet if this is a non-blocking flush and there Looks good, but since this is a cleanup, I'm queueing it for 3.1 rather than pushing it in the regression-fixing window.
OK, thanks!
Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html