[Devel] [PATCH RHEL7 COMMIT] ms/errseq: rename __errseq_set to errseq_set

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 18 12:02:01 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.3
------>
commit 9bc779c0bb958853c8d69329979929fd1a9bfce8
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Mon Jun 18 12:02:00 2018 +0300

    ms/errseq: rename __errseq_set to errseq_set
    
    Nothing calls this wrapper anymore, so just remove it and rename the
    old function to get rid of the double underscore prefix.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    
    https://pmc.acronis.com/browse/VSTOR-10912
    (cherry picked from commit 3acdfd280fe7d807237f2cb7a09d6f8f7f1b484f)
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 include/linux/errseq.h |  9 +--------
 lib/errseq.c           | 17 +++++++----------
 mm/filemap.c           |  2 +-
 3 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/include/linux/errseq.h b/include/linux/errseq.h
index 9e0d444ac88d..784f0860527b 100644
--- a/include/linux/errseq.h
+++ b/include/linux/errseq.h
@@ -5,14 +5,7 @@
 
 typedef u32	errseq_t;
 
-errseq_t __errseq_set(errseq_t *eseq, int err);
-static inline void errseq_set(errseq_t *eseq, int err)
-{
-	/* Optimize for the common case of no error */
-	if (unlikely(err))
-		__errseq_set(eseq, err);
-}
-
+errseq_t errseq_set(errseq_t *eseq, int err);
 errseq_t errseq_sample(errseq_t *eseq);
 int errseq_check(errseq_t *eseq, errseq_t since);
 int errseq_check_and_advance(errseq_t *eseq, errseq_t *since);
diff --git a/lib/errseq.c b/lib/errseq.c
index 841fa24e6e00..7b900c2a277a 100644
--- a/lib/errseq.c
+++ b/lib/errseq.c
@@ -41,23 +41,20 @@
 #define ERRSEQ_CTR_INC		(1 << (ERRSEQ_SHIFT + 1))
 
 /**
- * __errseq_set - set a errseq_t for later reporting
+ * errseq_set - set a errseq_t for later reporting
  * @eseq: errseq_t field that should be set
- * @err: error to set
+ * @err: error to set (must be between -1 and -MAX_ERRNO)
  *
  * This function sets the error in *eseq, and increments the sequence counter
  * if the last sequence was sampled at some point in the past.
  *
  * Any error set will always overwrite an existing error.
  *
- * Most callers will want to use the errseq_set inline wrapper to efficiently
- * handle the common case where err is 0.
- *
- * We do return an errseq_t here, primarily for debugging purposes. The return
- * value should not be used as a previously sampled value in later calls as it
- * will not have the SEEN flag set.
+ * We do return the latest value here, primarily for debugging purposes. The
+ * return value should not be used as a previously sampled value in later calls
+ * as it will not have the SEEN flag set.
  */
-errseq_t __errseq_set(errseq_t *eseq, int err)
+errseq_t errseq_set(errseq_t *eseq, int err)
 {
 	errseq_t cur, old;
 
@@ -107,7 +104,7 @@ errseq_t __errseq_set(errseq_t *eseq, int err)
 	}
 	return cur;
 }
-EXPORT_SYMBOL(__errseq_set);
+EXPORT_SYMBOL(errseq_set);
 
 /**
  * errseq_sample - grab current errseq_t value
diff --git a/mm/filemap.c b/mm/filemap.c
index 32882a19ed10..b9c5e2a3f949 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -560,7 +560,7 @@ EXPORT_SYMBOL(filemap_write_and_wait_range);
 
 void __filemap_set_wb_err(struct address_space *mapping, int err)
 {
-	errseq_t eseq = __errseq_set(&mapping->wb_err, err);
+	errseq_t eseq = errseq_set(&mapping->wb_err, err);
 
 	trace_filemap_set_wb_err(mapping, eseq);
 }


More information about the Devel mailing list