public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs_unlink() again, and trivial nfs_fhget
@ 2003-06-17 12:14 Frank Cusack
  2003-06-17 18:41 ` Trond Myklebust
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Cusack @ 2003-06-17 12:14 UTC (permalink / raw)
  To: torvalds; +Cc: lkml

The first one didn't make it into 2.5.71/72, but is necessary. :-)
The second one removes a redundant assignment.

/fc

diff -urp linux-2.5.72/fs/namei.c linux-2.5.72-silly/fs/namei.c
--- linux-2.5.72/fs/namei.c	Mon Jun 16 21:19:57 2003
+++ linux-2.5.72-silly/fs/namei.c	Tue Jun 17 05:09:04 2003
@@ -985,6 +985,8 @@ static inline int check_sticky(struct in
  *  7. If we were asked to remove a directory and victim isn't one - ENOTDIR.
  *  8. If we were asked to remove a non-directory and victim isn't one - EISDIR.
  *  9. We can't remove a root or mountpoint.
+ * 10. We don't allow removal of NFS sillyrenamed files; it's handled by
+ *     nfs_async_unlink().
  */
 static inline int may_delete(struct inode *dir,struct dentry *victim, int isdir)
 {
@@ -1008,6 +1010,8 @@ static inline int may_delete(struct inod
 		return -EISDIR;
 	if (IS_DEADDIR(dir))
 		return -ENOENT;
+	if (victim->d_flags & DCACHE_NFSFS_RENAMED)
+		return -EBUSY;
 	return 0;
 }
 
diff -urp linux-2.5.72/fs/nfs/inode.c linux-2.5.72-silly/fs/nfs/inode.c
--- linux-2.5.72/fs/nfs/inode.c	Mon Jun 16 21:20:20 2003
+++ linux-2.5.72-silly/fs/nfs/inode.c	Tue Jun 17 05:03:19 2003
@@ -715,7 +715,6 @@ __nfs_fhget(struct super_block *sb, stru
 		if (fattr->valid & NFS_ATTR_FATTR_V4)
 			nfsi->change_attr = fattr->change_attr;
 		inode->i_size = nfs_size_to_loff_t(fattr->size);
-		inode->i_mode = fattr->mode;
 		inode->i_nlink = fattr->nlink;
 		inode->i_uid = fattr->uid;
 		inode->i_gid = fattr->gid;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-06-22  7:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-17 12:14 [PATCH] nfs_unlink() again, and trivial nfs_fhget Frank Cusack
2003-06-17 18:41 ` Trond Myklebust
2003-06-17 23:55   ` Frank Cusack
2003-06-18  0:06     ` Frank Cusack
2003-06-18 23:40     ` Trond Myklebust
2003-06-22  1:46       ` Frank Cusack
2003-06-22  1:56         ` Frank Cusack
2003-06-22  7:29         ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox