aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-03-14 15:37:53 +0800
committerAlex Shi <alex.shi@linaro.org>2016-03-14 15:37:53 +0800
commitfbb0b56de45bc81681eeeaec29e6c1e3ff12a200 (patch)
treeb40400c596280b6fe6b03641618bb73d196952c3 /fs/btrfs/send.c
parent9d8a5571197f43541c8eec6d8d4dcd1ff4deecec (diff)
parent19d0bd71d564448446bd851d752caf3e31520ac8 (diff)
Merge tag 'v3.10.100' into linux-linaro-lsk-v3.10lsk-v3.10-16.03linux-linaro-lsk-v3.10
This is the 3.10.100 stable release
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 414c1b9eb896..3104e0eec816 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1338,7 +1338,21 @@ static int read_symlink(struct send_ctx *sctx,
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
if (ret < 0)
goto out;
- BUG_ON(ret);
+ if (ret) {
+ /*
+ * An empty symlink inode. Can happen in rare error paths when
+ * creating a symlink (transaction committed before the inode
+ * eviction handler removed the symlink inode items and a crash
+ * happened in between or the subvol was snapshoted in between).
+ * Print an informative message to dmesg/syslog so that the user
+ * can delete the symlink.
+ */
+ btrfs_err(root->fs_info,
+ "Found empty symlink inode %llu at root %llu",
+ ino, root->root_key.objectid);
+ ret = -EIO;
+ goto out;
+ }
ei = btrfs_item_ptr(path->nodes[0], path->slots[0],
struct btrfs_file_extent_item);