From: Steven Whitehouse <swhiteho@redhat.com>
Date: Tue, 19 May 2009 13:25:16 +0000 (+0100)
Subject: GFS2: Don't warn when delete inode fails on ro filesystem
X-Git-Tag: firefly_0821_release~13980^2~15
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ef9e8b14a5c1d0afbaf12b4c3b271188ddfc52a4;p=firefly-linux-kernel-4.4.55.git

GFS2: Don't warn when delete inode fails on ro filesystem

If the filesystem is read-only, then we expect that delete inode
will fail, so there is no need to warn about it.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---

diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index a3c2272e7cad..2fd1dcbcc5b7 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -714,7 +714,7 @@ out_unlock:
 		gfs2_glock_dq(&ip->i_iopen_gh);
 	gfs2_holder_uninit(&ip->i_iopen_gh);
 	gfs2_glock_dq_uninit(&gh);
-	if (error && error != GLR_TRYFAILED)
+	if (error && error != GLR_TRYFAILED && error != -EROFS)
 		fs_warn(sdp, "gfs2_delete_inode: %d\n", error);
 out:
 	truncate_inode_pages(&inode->i_data, 0);