[CIFS] [CIFS] Do not take rename sem on most path based calls (during
building of full path) to avoid hang rename/readdir hang Reported by Alan Tyson Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
@ -62,9 +62,7 @@ int cifs_removexattr(struct dentry * direntry, const char * ea_name)
|
||||
cifs_sb = CIFS_SB(sb);
|
||||
pTcon = cifs_sb->tcon;
|
||||
|
||||
mutex_lock(&sb->s_vfs_rename_mutex);
|
||||
full_path = build_path_from_dentry(direntry);
|
||||
mutex_unlock(&sb->s_vfs_rename_mutex);
|
||||
if(full_path == NULL) {
|
||||
FreeXid(xid);
|
||||
return -ENOMEM;
|
||||
@ -116,9 +114,7 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name,
|
||||
cifs_sb = CIFS_SB(sb);
|
||||
pTcon = cifs_sb->tcon;
|
||||
|
||||
mutex_lock(&sb->s_vfs_rename_mutex);
|
||||
full_path = build_path_from_dentry(direntry);
|
||||
mutex_unlock(&sb->s_vfs_rename_mutex);
|
||||
if(full_path == NULL) {
|
||||
FreeXid(xid);
|
||||
return -ENOMEM;
|
||||
@ -223,9 +219,7 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name,
|
||||
cifs_sb = CIFS_SB(sb);
|
||||
pTcon = cifs_sb->tcon;
|
||||
|
||||
mutex_lock(&sb->s_vfs_rename_mutex);
|
||||
full_path = build_path_from_dentry(direntry);
|
||||
mutex_unlock(&sb->s_vfs_rename_mutex);
|
||||
if(full_path == NULL) {
|
||||
FreeXid(xid);
|
||||
return -ENOMEM;
|
||||
@ -341,9 +335,7 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * data, size_t buf_size)
|
||||
cifs_sb = CIFS_SB(sb);
|
||||
pTcon = cifs_sb->tcon;
|
||||
|
||||
mutex_lock(&sb->s_vfs_rename_mutex);
|
||||
full_path = build_path_from_dentry(direntry);
|
||||
mutex_unlock(&sb->s_vfs_rename_mutex);
|
||||
if(full_path == NULL) {
|
||||
FreeXid(xid);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user