]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop broken ubifs patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Dec 2018 10:49:53 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Dec 2018 10:49:53 +0000 (11:49 +0100)
queue-4.14/series
queue-4.14/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch [deleted file]
queue-4.9/series
queue-4.9/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch [deleted file]

index 81ce7314c81f6f8296eca1428e87a13204108b79..ca16ef418cbc55a56c511b66f5fb6256c1b67a1c 100644 (file)
@@ -13,5 +13,4 @@ usb-serial-option-add-hp-lt4132.patch
 usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch
 usb-serial-option-add-fibocom-nl668-series.patch
 usb-serial-option-add-telit-ln940-series.patch
-ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
 scsi-sd-use-mempool-for-discard-special-page.patch
diff --git a/queue-4.14/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch b/queue-4.14/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
deleted file mode 100644 (file)
index 40e5f0b..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-From e58725d51fa8da9133f3f1c54170aa2e43056b91 Mon Sep 17 00:00:00 2001
-From: Richard Weinberger <richard@nod.at>
-Date: Wed, 7 Nov 2018 23:04:43 +0100
-Subject: ubifs: Handle re-linking of inodes correctly while recovery
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Richard Weinberger <richard@nod.at>
-
-commit e58725d51fa8da9133f3f1c54170aa2e43056b91 upstream.
-
-UBIFS's recovery code strictly assumes that a deleted inode will never
-come back, therefore it removes all data which belongs to that inode
-as soon it faces an inode with link count 0 in the replay list.
-Before O_TMPFILE this assumption was perfectly fine. With O_TMPFILE
-it can lead to data loss upon a power-cut.
-
-Consider a journal with entries like:
-0: inode X (nlink = 0) /* O_TMPFILE was created */
-1: data for inode X /* Someone writes to the temp file */
-2: inode X (nlink = 0) /* inode was changed, xattr, chmod, … */
-3: inode X (nlink = 1) /* inode was re-linked via linkat() */
-
-Upon replay of entry #2 UBIFS will drop all data that belongs to inode X,
-this will lead to an empty file after mounting.
-
-As solution for this problem, scan the replay list for a re-link entry
-before dropping data.
-
-Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE")
-Cc: stable@vger.kernel.org
-Cc: Russell Senior <russell@personaltelco.net>
-Cc: Rafał Miłecki <zajec5@gmail.com>
-Reported-by: Russell Senior <russell@personaltelco.net>
-Reported-by: Rafał Miłecki <zajec5@gmail.com>
-Tested-by: Rafał Miłecki <rafal@milecki.pl>
-Signed-off-by: Richard Weinberger <richard@nod.at>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ubifs/replay.c |   37 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 37 insertions(+)
-
---- a/fs/ubifs/replay.c
-+++ b/fs/ubifs/replay.c
-@@ -210,6 +210,38 @@ static int trun_remove_range(struct ubif
- }
- /**
-+ * inode_still_linked - check whether inode in question will be re-linked.
-+ * @c: UBIFS file-system description object
-+ * @rino: replay entry to test
-+ *
-+ * O_TMPFILE files can be re-linked, this means link count goes from 0 to 1.
-+ * This case needs special care, otherwise all references to the inode will
-+ * be removed upon the first replay entry of an inode with link count 0
-+ * is found.
-+ */
-+static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
-+{
-+      struct replay_entry *r;
-+
-+      ubifs_assert(c, rino->deletion);
-+      ubifs_assert(c, key_type(c, &rino->key) == UBIFS_INO_KEY);
-+
-+      /*
-+       * Find the most recent entry for the inode behind @rino and check
-+       * whether it is a deletion.
-+       */
-+      list_for_each_entry_reverse(r, &c->replay_list, list) {
-+              ubifs_assert(c, r->sqnum >= rino->sqnum);
-+              if (key_inum(c, &r->key) == key_inum(c, &rino->key))
-+                      return r->deletion == 0;
-+
-+      }
-+
-+      ubifs_assert(c, 0);
-+      return false;
-+}
-+
-+/**
-  * apply_replay_entry - apply a replay entry to the TNC.
-  * @c: UBIFS file-system description object
-  * @r: replay entry to apply
-@@ -239,6 +271,11 @@ static int apply_replay_entry(struct ubi
-                       {
-                               ino_t inum = key_inum(c, &r->key);
-+                              if (inode_still_linked(c, r)) {
-+                                      err = 0;
-+                                      break;
-+                              }
-+
-                               err = ubifs_tnc_remove_ino(c, inum);
-                               break;
-                       }
index 79d7afbbe4bb38d3f9e9d97c95aa6bf5b2fa2140..8aa95da6448419f7eaf5b8df9ef796b44dcf5eee 100644 (file)
@@ -8,4 +8,3 @@ usb-serial-option-add-hp-lt4132.patch
 usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch
 usb-serial-option-add-fibocom-nl668-series.patch
 usb-serial-option-add-telit-ln940-series.patch
-ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
diff --git a/queue-4.9/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch b/queue-4.9/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
deleted file mode 100644 (file)
index 40e5f0b..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-From e58725d51fa8da9133f3f1c54170aa2e43056b91 Mon Sep 17 00:00:00 2001
-From: Richard Weinberger <richard@nod.at>
-Date: Wed, 7 Nov 2018 23:04:43 +0100
-Subject: ubifs: Handle re-linking of inodes correctly while recovery
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Richard Weinberger <richard@nod.at>
-
-commit e58725d51fa8da9133f3f1c54170aa2e43056b91 upstream.
-
-UBIFS's recovery code strictly assumes that a deleted inode will never
-come back, therefore it removes all data which belongs to that inode
-as soon it faces an inode with link count 0 in the replay list.
-Before O_TMPFILE this assumption was perfectly fine. With O_TMPFILE
-it can lead to data loss upon a power-cut.
-
-Consider a journal with entries like:
-0: inode X (nlink = 0) /* O_TMPFILE was created */
-1: data for inode X /* Someone writes to the temp file */
-2: inode X (nlink = 0) /* inode was changed, xattr, chmod, … */
-3: inode X (nlink = 1) /* inode was re-linked via linkat() */
-
-Upon replay of entry #2 UBIFS will drop all data that belongs to inode X,
-this will lead to an empty file after mounting.
-
-As solution for this problem, scan the replay list for a re-link entry
-before dropping data.
-
-Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE")
-Cc: stable@vger.kernel.org
-Cc: Russell Senior <russell@personaltelco.net>
-Cc: Rafał Miłecki <zajec5@gmail.com>
-Reported-by: Russell Senior <russell@personaltelco.net>
-Reported-by: Rafał Miłecki <zajec5@gmail.com>
-Tested-by: Rafał Miłecki <rafal@milecki.pl>
-Signed-off-by: Richard Weinberger <richard@nod.at>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/ubifs/replay.c |   37 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 37 insertions(+)
-
---- a/fs/ubifs/replay.c
-+++ b/fs/ubifs/replay.c
-@@ -210,6 +210,38 @@ static int trun_remove_range(struct ubif
- }
- /**
-+ * inode_still_linked - check whether inode in question will be re-linked.
-+ * @c: UBIFS file-system description object
-+ * @rino: replay entry to test
-+ *
-+ * O_TMPFILE files can be re-linked, this means link count goes from 0 to 1.
-+ * This case needs special care, otherwise all references to the inode will
-+ * be removed upon the first replay entry of an inode with link count 0
-+ * is found.
-+ */
-+static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
-+{
-+      struct replay_entry *r;
-+
-+      ubifs_assert(c, rino->deletion);
-+      ubifs_assert(c, key_type(c, &rino->key) == UBIFS_INO_KEY);
-+
-+      /*
-+       * Find the most recent entry for the inode behind @rino and check
-+       * whether it is a deletion.
-+       */
-+      list_for_each_entry_reverse(r, &c->replay_list, list) {
-+              ubifs_assert(c, r->sqnum >= rino->sqnum);
-+              if (key_inum(c, &r->key) == key_inum(c, &rino->key))
-+                      return r->deletion == 0;
-+
-+      }
-+
-+      ubifs_assert(c, 0);
-+      return false;
-+}
-+
-+/**
-  * apply_replay_entry - apply a replay entry to the TNC.
-  * @c: UBIFS file-system description object
-  * @r: replay entry to apply
-@@ -239,6 +271,11 @@ static int apply_replay_entry(struct ubi
-                       {
-                               ino_t inum = key_inum(c, &r->key);
-+                              if (inode_still_linked(c, r)) {
-+                                      err = 0;
-+                                      break;
-+                              }
-+
-                               err = ubifs_tnc_remove_ino(c, inum);
-                               break;
-                       }