From: girishc Date: Sat, 13 Sep 2003 11:28:36 +0000 (+0000) Subject: b=1825 X-Git-Tag: v1_7_0_51~2^9~308 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4e8b48e2a8fe64e1c361fae721d48e6511679cdc;p=fs%2Flustre-release.git b=1825 fix minor bug during rename --- diff --git a/lustre/kernel_patches/patches/nfs_export_kernel-2.4.20.patch b/lustre/kernel_patches/patches/nfs_export_kernel-2.4.20.patch index f4b3e51..b0230c9 100644 --- a/lustre/kernel_patches/patches/nfs_export_kernel-2.4.20.patch +++ b/lustre/kernel_patches/patches/nfs_export_kernel-2.4.20.patch @@ -240,8 +240,8 @@ diff -uprN linux/fs/nfsd/nfsfh.c linux-2.4.20/fs/nfsd/nfsfh.c diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c --- linux/fs/nfsd/vfs.c 2002-11-29 05:23:15.000000000 +0530 -+++ linux-2.4.20/fs/nfsd/vfs.c 2003-09-12 19:23:13.000000000 +0530 -@@ -77,6 +77,132 @@ struct raparms { ++++ linux-2.4.20/fs/nfsd/vfs.c 2003-09-13 17:31:21.000000000 +0530 +@@ -77,6 +77,133 @@ struct raparms { static struct raparms * raparml; static struct raparms * raparm_cache; @@ -340,6 +340,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c + struct nameidata new_nd = { .dentry = tdentry, .last = ndentry->d_name}; + struct inode_operations *op = old_nd.dentry->d_inode->i_op; + err = op->rename_raw(&old_nd, &new_nd); ++ d_move(odentry, ndentry); + + return err; +} @@ -374,7 +375,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c /* * Look up one component of a pathname. * N.B. After this call _both_ fhp and resfh need an fh_put -@@ -300,7 +426,10 @@ nfsd_setattr(struct svc_rqst *rqstp, str +@@ -300,7 +427,10 @@ nfsd_setattr(struct svc_rqst *rqstp, str } err = nfserr_notsync; if (!check_guard || guardtime == inode->i_ctime) { @@ -386,7 +387,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c err = nfserrno(err); } if (size_change) { -@@ -473,6 +602,15 @@ nfsd_open(struct svc_rqst *rqstp, struct +@@ -473,6 +603,15 @@ nfsd_open(struct svc_rqst *rqstp, struct filp->f_mode = FMODE_READ; } @@ -402,7 +403,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c err = 0; if (filp->f_op && filp->f_op->open) { err = filp->f_op->open(inode, filp); -@@ -487,7 +625,11 @@ nfsd_open(struct svc_rqst *rqstp, struct +@@ -487,7 +626,11 @@ nfsd_open(struct svc_rqst *rqstp, struct atomic_dec(&filp->f_count); } } @@ -414,7 +415,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c if (err) err = nfserrno(err); out: -@@ -818,7 +960,7 @@ nfsd_create(struct svc_rqst *rqstp, stru +@@ -818,7 +961,7 @@ nfsd_create(struct svc_rqst *rqstp, stru { struct dentry *dentry, *dchild; struct inode *dirp; @@ -423,7 +424,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c err = nfserr_perm; if (!flen) -@@ -834,8 +976,24 @@ nfsd_create(struct svc_rqst *rqstp, stru +@@ -834,8 +977,24 @@ nfsd_create(struct svc_rqst *rqstp, stru dentry = fhp->fh_dentry; dirp = dentry->d_inode; @@ -449,7 +450,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c goto out; /* * Check whether the response file handle has been verified yet. -@@ -868,10 +1026,12 @@ nfsd_create(struct svc_rqst *rqstp, stru +@@ -868,10 +1027,12 @@ nfsd_create(struct svc_rqst *rqstp, stru * Make sure the child dentry is still negative ... */ err = nfserr_exist; @@ -466,7 +467,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c } if (!(iap->ia_valid & ATTR_MODE)) -@@ -887,13 +1047,15 @@ nfsd_create(struct svc_rqst *rqstp, stru +@@ -887,13 +1048,15 @@ nfsd_create(struct svc_rqst *rqstp, stru err = vfs_create(dirp, dchild, iap->ia_mode); break; case S_IFDIR: @@ -484,7 +485,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c break; default: printk("nfsd: bad file type %o in nfsd_create\n", type); -@@ -962,7 +1124,10 @@ nfsd_create_v3(struct svc_rqst *rqstp, s +@@ -962,7 +1125,10 @@ nfsd_create_v3(struct svc_rqst *rqstp, s /* Get all the sanity checks out of the way before * we lock the parent. */ err = nfserr_notdir; @@ -496,7 +497,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c goto out; fh_lock(fhp); -@@ -1013,6 +1178,8 @@ nfsd_create_v3(struct svc_rqst *rqstp, s +@@ -1013,6 +1179,8 @@ nfsd_create_v3(struct svc_rqst *rqstp, s case NFS3_CREATE_GUARDED: err = nfserr_exist; } @@ -505,7 +506,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c goto out; } -@@ -1119,7 +1286,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str +@@ -1119,7 +1287,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str struct iattr *iap) { struct dentry *dentry, *dnew; @@ -514,7 +515,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c err = nfserr_noent; if (!flen || !plen) -@@ -1133,12 +1300,18 @@ nfsd_symlink(struct svc_rqst *rqstp, str +@@ -1133,12 +1301,18 @@ nfsd_symlink(struct svc_rqst *rqstp, str goto out; fh_lock(fhp); dentry = fhp->fh_dentry; @@ -534,7 +535,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c if (!err) { if (EX_ISSYNC(fhp->fh_export)) nfsd_sync_dir(dentry); -@@ -1148,7 +1321,10 @@ nfsd_symlink(struct svc_rqst *rqstp, str +@@ -1148,7 +1322,10 @@ nfsd_symlink(struct svc_rqst *rqstp, str iap->ia_valid |= ATTR_CTIME; iap->ia_mode = (iap->ia_mode&S_IALLUGO) | S_IFLNK; @@ -546,7 +547,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c if (!err && EX_ISSYNC(fhp->fh_export)) write_inode_now(dentry->d_inode, 1); } -@@ -1206,7 +1382,10 @@ nfsd_link(struct svc_rqst *rqstp, struct +@@ -1206,7 +1383,10 @@ nfsd_link(struct svc_rqst *rqstp, struct dold = tfhp->fh_dentry; dest = dold->d_inode; @@ -558,7 +559,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c if (!err) { if (EX_ISSYNC(ffhp->fh_export)) { nfsd_sync_dir(ddir); -@@ -1291,7 +1470,10 @@ nfsd_rename(struct svc_rqst *rqstp, stru +@@ -1291,7 +1471,10 @@ nfsd_rename(struct svc_rqst *rqstp, stru err = nfserr_perm; } else #endif @@ -570,7 +571,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c if (!err && EX_ISSYNC(tfhp->fh_export)) { nfsd_sync_dir(tdentry); nfsd_sync_dir(fdentry); -@@ -1312,7 +1494,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru +@@ -1312,7 +1495,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru fill_post_wcc(tfhp); double_up(&tdir->i_sem, &fdir->i_sem); ffhp->fh_locked = tfhp->fh_locked = 0; @@ -579,7 +580,7 @@ diff -uprN linux/fs/nfsd/vfs.c linux-2.4.20/fs/nfsd/vfs.c out: return err; } -@@ -1358,9 +1540,15 @@ nfsd_unlink(struct svc_rqst *rqstp, stru +@@ -1358,9 +1541,15 @@ nfsd_unlink(struct svc_rqst *rqstp, stru err = nfserr_perm; } else #endif