* attribute dirs shouldn't be locked out either; I've inverted the type check,
so that it now only checks for the type that allow locking. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25168 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2523,13 +2523,10 @@ get_new_fd(int type, struct fs_mount *mount, struct vnode *vnode,
|
|||||||
struct file_descriptor *descriptor;
|
struct file_descriptor *descriptor;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
// if the vnode is locked, we don't allow creating a new file descriptor for it
|
// If the vnode is locked, we don't allow creating a new file/directory
|
||||||
// unless it is an attribute that is being created as, in this case,
|
// file_descriptor for it
|
||||||
// the caller is guaranteed to be the lock holder.
|
if (vnode && vnode->mandatory_locked_by != NULL
|
||||||
// TODO(bga): Is this really true? If I understand this correctly, only
|
&& (type == FDTYPE_FILE || type == FDTYPE_DIR))
|
||||||
// the lock owner would be able to reach the code here, but I am not
|
|
||||||
// 100% sure.
|
|
||||||
if (vnode && vnode->mandatory_locked_by != NULL && type != FDTYPE_ATTR)
|
|
||||||
return B_BUSY;
|
return B_BUSY;
|
||||||
|
|
||||||
descriptor = alloc_fd();
|
descriptor = alloc_fd();
|
||||||
|
|||||||
Reference in New Issue
Block a user