lkml.org 
[lkml]   [2002]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpatch 31/38: SERVER: allow type==0 in nfsd_unlink()

If nfsd_unlink() is called with @type equal to 0, then let it do the
right thing regardless of the type of the file being unlinked. This
is needed for the NFSv4 REMOVE operation, which works for any type of
file, even directories.

--- old/fs/nfsd/vfs.c Tue Jul 30 23:28:23 2002
+++ new/fs/nfsd/vfs.c Tue Jul 30 23:59:38 2002
@@ -1329,6 +1329,9 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
goto out;
}

+ if (!type)
+ type = rdentry->d_inode->i_mode & S_IFMT;
+
if (type != S_IFDIR) { /* It's UNLINK */
#ifdef MSNFS
if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.030 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site