Commit 5287540e authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

irmap: use kdev everywere

Currently we kdev and odev together and try to compare them without
converting to the one type.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent a2a41df9
...@@ -88,7 +88,7 @@ static int irmap_update_stat(struct irmap *i) ...@@ -88,7 +88,7 @@ static int irmap_update_stat(struct irmap *i)
} }
i->revalidate = false; i->revalidate = false;
i->dev = st.st_dev; i->dev = MKKDEV(major(st.st_dev), minor(st.st_dev));
i->ino = st.st_ino; i->ino = st.st_ino;
if (!S_ISDIR(st.st_mode)) if (!S_ISDIR(st.st_mode))
i->nr_kids = 0; /* don't irmap_update_dir */ i->nr_kids = 0; /* don't irmap_update_dir */
...@@ -203,7 +203,7 @@ static int irmap_revalidate(struct irmap *c, struct irmap **p) ...@@ -203,7 +203,7 @@ static int irmap_revalidate(struct irmap *c, struct irmap **p)
goto invalid; goto invalid;
} }
if (c->dev != st.st_dev) if (c->dev != MKKDEV(major(st.st_dev), minor(st.st_dev)))
goto invalid; goto invalid;
if (c->ino != st.st_ino) if (c->ino != st.st_ino)
goto invalid; goto invalid;
...@@ -228,8 +228,6 @@ char *irmap_lookup(unsigned int s_dev, unsigned long i_ino) ...@@ -228,8 +228,6 @@ char *irmap_lookup(unsigned int s_dev, unsigned long i_ino)
int hv; int hv;
struct irmap_path_opt *o; struct irmap_path_opt *o;
s_dev = kdev_to_odev(s_dev);
pr_debug("Resolving %x:%lx path\n", s_dev, i_ino); pr_debug("Resolving %x:%lx path\n", s_dev, i_ino);
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment