Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-06-14 22:33:58 +0200
committerJiri Kosina <jkosina@suse.cz>2016-06-14 22:33:58 +0200
commit34efe7ad859b1b3ee7128e1bc0ba64c8ed4539a2 (patch)
treea14457d5338523686f183c3db3acedc78c74af1a
parent3b8817531ae1be29cc5068ce24beae90ced82bc2 (diff)
Revert "get_rock_ridge_filename(): handle malformed NM entries"rpm-3.0.101-77
This reverts commit 8162f86bac2f97716c8e4e26923e8995b1dce315. It should have never landed in the tree (we already have the patch via 067d4e14fe2 that came through CVE branch), but I messed up the merge. Signed-off-by: Jiri Kosina <jkosina@suse.cz> suse-commit: a082ea64764285d05533c7b131c8bfaa72c19771
-rw-r--r--BROKEN1
-rw-r--r--fs/nfs/idmap.c11
2 files changed, 7 insertions, 5 deletions
diff --git a/BROKEN b/BROKEN
deleted file mode 100644
index ceb30cbbd94f..000000000000
--- a/BROKEN
+++ /dev/null
@@ -1 +0,0 @@
-This patch series did not apply, a later commit will contain the changes.
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index a92c29f38acd..253dd0eeb16c 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -429,10 +429,13 @@ idmap_name_hash(struct idmap_hashtable* h, const char *name, size_t len)
static char *get_ih_name(struct idmap_hashtable *h, struct idmap_hashent *he)
{
- int i = he - h->h_entries;
- int p = (i * IDMAP_NAMESZ) / PAGE_SIZE;
- i -= p * PAGE_SIZE;
- return h->h_names[p] + i * IDMAP_NAMESZ;
+ unsigned int i = he - h->h_entries;
+ unsigned int offset = i * IDMAP_NAMESZ;
+ unsigned int p = offset >> PAGE_SHIFT;
+
+ offset &= (PAGE_SIZE - 1);
+
+ return h->h_names[p] + offset;
}
static struct idmap_hashent *