From: adilger Date: Thu, 19 Sep 2002 23:19:55 +0000 (+0000) Subject: Add link support to vanilla kernel patch. X-Git-Tag: 0.5.11~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b55368051d7d3c88a0ea90668fecca969fd2b7f2;p=fs%2Flustre-release.git Add link support to vanilla kernel patch. --- diff --git a/lustre/patches/patch-2.4.18 b/lustre/patches/patch-2.4.18 index f30ecd6..23bc0c6 100644 --- a/lustre/patches/patch-2.4.18 +++ b/lustre/patches/patch-2.4.18 @@ -989,11 +989,21 @@ from = getname(oldname); if(IS_ERR(from)) -@@ -1648,10 +1755,12 @@ +@@ -1639,7 +1745,7 @@ + + error = 0; + if (path_init(from, LOOKUP_POSITIVE, &old_nd)) +- error = path_walk(from, &old_nd); ++ error = path_walk_it(from, &old_nd, &it); + if (error) + goto exit; + if (path_init(to, LOOKUP_PARENT, &nd)) +@@ -1648,10 +1755,13 @@ error = -EXDEV; if (old_nd.mnt != nd.mnt) goto out_release; - new_dentry = lookup_create(&nd, 0); ++ it.it_op = IT_LINK2; + new_dentry = lookup_create(&nd, 0, &it); error = PTR_ERR(new_dentry); if (!IS_ERR(new_dentry)) { diff --git a/lustre/patches/patch-2.4.18-12.5 b/lustre/patches/patch-2.4.18-12.5 index db7304a..cf81ce7 100644 --- a/lustre/patches/patch-2.4.18-12.5 +++ b/lustre/patches/patch-2.4.18-12.5 @@ -830,7 +830,7 @@ if (old_nd.mnt != nd.mnt) goto out_release; - new_dentry = lookup_create(&nd, 0); -+ it.it_op = IT_LINK2; ++ it.it_op = IT_LINK2; + new_dentry = lookup_create(&nd, 0, &it); error = PTR_ERR(new_dentry); if (!IS_ERR(new_dentry)) { @@ -1185,11 +1185,10 @@ + error = open_namei_it(filename, namei_flags, mode, &nd, &it); + if (error) + return ERR_PTR(error); -+ ++ + return dentry_open_it(nd.dentry, nd.mnt, flags, &it); } -- -+ + extern ssize_t do_readahead(struct file *file, unsigned long index, unsigned long nr); /* for files over a certains size it doesn't pay to do readahead on open */ #define READAHEAD_CUTOFF 48000