From: Frank Cusack <fcusack@fcusack.com>
To: torvalds@transmeta.com
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] nfs_unlink() again, and trivial nfs_fhget
Date: Tue, 17 Jun 2003 05:14:09 -0700 [thread overview]
Message-ID: <20030617051408.A17974@google.com> (raw)
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;
next reply other threads:[~2003-06-17 12:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-17 12:14 Frank Cusack [this message]
2003-06-17 18:41 ` [PATCH] nfs_unlink() again, and trivial nfs_fhget 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030617051408.A17974@google.com \
--to=fcusack@fcusack.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.