summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/mount.c
diff options
context:
space:
mode:
authorTejun Heo2013-12-11 22:02:59 +0100
committerGreg Kroah-Hartman2013-12-17 17:59:15 +0100
commit19bbb926203dbcf3a03915e934c36d7681bf6e13 (patch)
treeef08b67839bb7d4265c397e40a5eab01da7bf1cf /fs/sysfs/mount.c
parentkernfs: update kernfs_rename_ns() to consider KERNFS_STATIC_NAME (diff)
downloadkernel-qcow2-linux-19bbb926203dbcf3a03915e934c36d7681bf6e13.tar.gz
kernel-qcow2-linux-19bbb926203dbcf3a03915e934c36d7681bf6e13.tar.xz
kernel-qcow2-linux-19bbb926203dbcf3a03915e934c36d7681bf6e13.zip
kernfs: allow negative dentries
kernfs doesn't allow negative dentries - kernfs_iop_lookup() returns ERR_PTR(-ENOENT) instead of NULL which short-circuits negative dentry creation and kernfs's d_delete() callback, kernfs_dop_delete(), returns 1 for all removed nodes. This in turn allows kernfs_dop_revalidate() to assume that there's no negative dentry for kernfs. This worked fine for sysfs but kernfs is scheduled to grow mkdir(2) support which depend on negative dentries. This patch updates so that kernfs allows negative dentries. The required changes are almost trivial - kernfs_iop_lookup() now returns NULL instead of ERR_PTR(-ENOENT) when the target kernfs_node doesn't exist, kernfs_dop_delete() is removed and kernfs_dop_revalidate() is updated to check whether the target dentry is negative and request fresh lookup if so. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/mount.c')
0 files changed, 0 insertions, 0 deletions