mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
Linux: Check for multiple silly renames
We don't want to do multiple silly renames of the same dcache entry, so add a check for that occuring, and just return EBUSY if we're trying to do so. Change-Id: Ic1cb4061d89bf87926995162f1ac410375bddcb5 Reviewed-on: http://gerrit.openafs.org/1035 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
ec352e0bfd
commit
e4708157ea
@ -65,6 +65,12 @@ afs_linux_set_nfsfs_renamed(struct dentry *dp) {
|
|||||||
dp->d_flags |= DCACHE_NFSFS_RENAMED;
|
dp->d_flags |= DCACHE_NFSFS_RENAMED;
|
||||||
spin_unlock(&dp->d_lock);
|
spin_unlock(&dp->d_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
afs_linux_nfsfs_renamed(struct dentry *dp) {
|
||||||
|
return dp->d_flags & DCACHE_NFSFS_RENAMED;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static inline void afs_linux_clear_nfsfs_renamed(void) { return; }
|
static inline void afs_linux_clear_nfsfs_renamed(void) { return; }
|
||||||
static inline void afs_linux_set_nfsfs_renamed(void) { return; }
|
static inline void afs_linux_set_nfsfs_renamed(void) { return; }
|
||||||
|
@ -1130,6 +1130,9 @@ afs_linux_sillyrename(struct inode *dir, struct dentry *dentry,
|
|||||||
char *__name = NULL;
|
char *__name = NULL;
|
||||||
int code;
|
int code;
|
||||||
|
|
||||||
|
if (afs_linux_nfsfs_renamed(dentry))
|
||||||
|
return EBUSY;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
dput(__dp);
|
dput(__dp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user