Index: uspace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision 14040e53f16bbe12f89d0e7bb08c134a731e92f2)
+++ uspace/lib/libfs/libfs.c	(revision 4f46695ea4abc4b87b2b395253598990f4ce682a)
@@ -217,9 +217,4 @@
 				}
 				goto out;
-			} else if (lflag & L_PARENT) {
-				/* return parent */
-				ipc_answer_5(rid, EOK, fs_handle, dev_handle,
-				    ops->index_get(cur), ops->size_get(cur),
-				    ops->lnkcnt_get(cur));
 			} 
 			ipc_answer_0(rid, ENOENT);
@@ -294,13 +289,4 @@
 
 	/* handle hit */
-	if (lflag & L_PARENT) {
-		ops->node_put(cur);
-		cur = par;
-		par = NULL;
-		if (!cur) {
-			ipc_answer_0(rid, ENOENT);
-			goto out;
-		}
-	}
 	if (lflag & L_UNLINK) {
 		unsigned old_lnkcnt = ops->lnkcnt_get(cur);
Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision 14040e53f16bbe12f89d0e7bb08c134a731e92f2)
+++ uspace/srv/vfs/vfs.h	(revision 4f46695ea4abc4b87b2b395253598990f4ce682a)
@@ -167,9 +167,4 @@
  */
 #define L_UNLINK	32	
-/**
- * L_PARENT performs a lookup but returns the triplet of the parent node.
- * This flag may not be combined with any other lookup flag.
- */
-#define L_PARENT	64	
 
 typedef enum vfs_node_type {
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 14040e53f16bbe12f89d0e7bb08c134a731e92f2)
+++ uspace/srv/vfs/vfs_ops.c	(revision 4f46695ea4abc4b87b2b395253598990f4ce682a)
@@ -990,6 +990,21 @@
 		return;
 	}
+	/* Determine the path to the parent of the node with the new name. */
+	char *parentc = str_dup(newc);
+	if (!parentc) {
+		rwlock_write_unlock(&namespace_rwlock);
+		ipc_answer_0(rid, rc);
+		free(old);
+		free(new);
+		return;
+	}
+	char *lastsl = str_rchr(parentc + 1, L'/');
+	if (lastsl)
+		*lastsl = '\0';
+	else
+		parentc[1] = '\0';
 	/* Lookup parent of the new file name. */
-	rc = vfs_lookup_internal(newc, L_PARENT, &new_par_lr, NULL);
+	rc = vfs_lookup_internal(parentc, L_NONE, &new_par_lr, NULL);
+	free(parentc);	/* not needed anymore */
 	if (rc != EOK) {
 		rwlock_write_unlock(&namespace_rwlock);
