git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
fs
/
cifs
/
link.c
diff --git
a/fs/cifs/link.c
b/fs/cifs/link.c
index
2ec99f8
..
0f99aae
100644
(file)
--- a/
fs/cifs/link.c
+++ b/
fs/cifs/link.c
@@
-48,8
+48,10
@@
cifs_hardlink(struct dentry *old_file, struct inode *inode,
/* No need to check for cross device links since server will do that
BB note DFS case in future though (when we may have to check) */
/* No need to check for cross device links since server will do that
BB note DFS case in future though (when we may have to check) */
+ down(&inode->i_sb->s_vfs_rename_sem);
fromName = build_path_from_dentry(old_file);
toName = build_path_from_dentry(direntry);
fromName = build_path_from_dentry(old_file);
toName = build_path_from_dentry(direntry);
+ up(&inode->i_sb->s_vfs_rename_sem);
if((fromName == NULL) || (toName == NULL)) {
rc = -ENOMEM;
goto cifs_hl_exit;
if((fromName == NULL) || (toName == NULL)) {
rc = -ENOMEM;
goto cifs_hl_exit;
@@
-65,7
+67,7
@@
cifs_hardlink(struct dentry *old_file, struct inode *inode,
cifs_sb_target->local_nls,
cifs_sb_target->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
cifs_sb_target->local_nls,
cifs_sb_target->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
- if(
(rc == -EIO) || (rc == -EINVAL)
)
+ if(
rc == -EIO
)
rc = -EOPNOTSUPP;
}
rc = -EOPNOTSUPP;
}
@@
-101,7
+103,9
@@
cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
xid = GetXid();
xid = GetXid();
+ down(&direntry->d_sb->s_vfs_rename_sem);
full_path = build_path_from_dentry(direntry);
full_path = build_path_from_dentry(direntry);
+ up(&direntry->d_sb->s_vfs_rename_sem);
if (!full_path)
goto out_no_free;
if (!full_path)
goto out_no_free;
@@
-160,7
+164,9
@@
cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
cifs_sb = CIFS_SB(inode->i_sb);
pTcon = cifs_sb->tcon;
cifs_sb = CIFS_SB(inode->i_sb);
pTcon = cifs_sb->tcon;
+ down(&inode->i_sb->s_vfs_rename_sem);
full_path = build_path_from_dentry(direntry);
full_path = build_path_from_dentry(direntry);
+ up(&inode->i_sb->s_vfs_rename_sem);
if(full_path == NULL) {
FreeXid(xid);
if(full_path == NULL) {
FreeXid(xid);
@@
-226,9
+232,9
@@
cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
/* BB would it be safe against deadlock to grab this sem
even though rename itself grabs the sem and calls lookup? */
/* BB would it be safe against deadlock to grab this sem
even though rename itself grabs the sem and calls lookup? */
-/*
mutex_lock(&inode->i_sb->s_vfs_rename_mutex
);*/
+/*
down(&inode->i_sb->s_vfs_rename_sem
);*/
full_path = build_path_from_dentry(direntry);
full_path = build_path_from_dentry(direntry);
-/*
mutex_unlock(&inode->i_sb->s_vfs_rename_mutex
);*/
+/*
up(&inode->i_sb->s_vfs_rename_sem
);*/
if(full_path == NULL) {
FreeXid(xid);
if(full_path == NULL) {
FreeXid(xid);