Index: uspace/lib/fs/libfs.c
===================================================================
--- uspace/lib/fs/libfs.c	(revision 758f8d55da31118ef5accb99051c4f46cc5c880a)
+++ uspace/lib/fs/libfs.c	(revision 7a98cef11fb8f3d08a03c92aae4d500d0a75a5d0)
@@ -806,9 +806,9 @@
 	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*request);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
-	
+
 	fs_node_t *fn;
 	int rc = ops->node_get(&fn, service_id, index);
 	on_error(rc, answer_and_return(rid, rc));
-	
+
 	ipc_callid_t callid;
 	size_t size;
@@ -820,8 +820,8 @@
 		return;
 	}
-	
+
 	struct stat stat;
 	memset(&stat, 0, sizeof(struct stat));
-	
+
 	stat.fs_handle = fs_handle;
 	stat.service_id = service_id;
@@ -832,5 +832,5 @@
 	stat.size = ops->size_get(fn);
 	stat.service = ops->service_get(fn);
-	
+
 	ops->node_put(fn);
 
@@ -845,39 +845,39 @@
 	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*request);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
-	
+
 	fs_node_t *fn;
 	int rc = ops->node_get(&fn, service_id, index);
 	on_error(rc, answer_and_return(rid, rc));
-	
+
 	ipc_callid_t callid;
 	size_t size;
 	if ((!async_data_read_receive(&callid, &size)) ||
 	    (size != sizeof(struct statfs))) {
-		ops->node_put(fn);
-		async_answer_0(callid, EINVAL);
-		async_answer_0(rid, EINVAL);
-		return;
-	}
-	
-	struct statfs statfs;
-	memset(&statfs, 0, sizeof(struct statfs));
-
-	if (NULL != ops->size_block) {	
-		rc = ops->size_block(service_id, &statfs.f_bsize);
-		if (rc != EOK) goto error;
-	}
-
-	if (NULL != ops->total_block_count) {
-		rc = ops->total_block_count(service_id, &statfs.f_blocks);
-		if (rc != EOK) goto error;
-	}
-
-	if (NULL != ops->free_block_count) {
-		rc = ops->free_block_count(service_id, &statfs.f_bfree);
-		if (rc != EOK) goto error;
+		goto error;
+	}
+
+	struct statfs st;
+	memset(&st, 0, sizeof(struct statfs));
+
+	if (ops->size_block != NULL) {
+		rc = ops->size_block(service_id, &st.f_bsize);
+		if (rc != EOK)
+			goto error;
+	}
+
+	if (ops->total_block_count != NULL) {
+		rc = ops->total_block_count(service_id, &st.f_blocks);
+		if (rc != EOK)
+			goto error;
+	}
+
+	if (ops->free_block_count != NULL) {
+		rc = ops->free_block_count(service_id, &st.f_bfree);
+		if (rc != EOK)
+			goto error;
 	}
 
 	ops->node_put(fn);
-	async_data_read_finalize(callid, &statfs, sizeof(struct statfs));
+	async_data_read_finalize(callid, &st, sizeof(struct statfs));
 	async_answer_0(rid, EOK);
 	return;
