Skip to contentSkip to conversation

Removed nfsd_path_(read|write) methods as they are pointless.

PATCH New Christopher Bii 1 participant 1 message Jan 21, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Removed nfsd_path_(read|write) methods as they are pointless.

---
 support/export/cache.c      |  4 +--
 support/export/export.c     |  2 +-
 support/include/nfsd_path.h |  3 ---
 support/misc/nfsd_path.c    | 49 -------------------------------------
 4 files changed, 3 insertions(+), 55 deletions(-)
support/export/cache.c +2 -2
index 6859a55b..0f6cf443 100644
@@ -59,12 +59,12 @@ static int is_mountpoint(const char *path)
 
 static ssize_t cache_read(int fd, char *buf, size_t len)
 {
-	return nfsd_path_read(fd, buf, len);
+	return read(fd, buf, len);
 }
 
 static ssize_t cache_write(int fd, void *buf, size_t len)
 {
-	return nfsd_path_write(fd, buf, len);
+	return write(fd, buf, len);
 }
 
 static bool path_lookup_error(int err)
support/export/export.c +1 -1
index 2c8c3335..e50af371 100644
@@ -463,7 +463,7 @@ int export_test(struct exportent *eep, int with_fsid)
 	fd = open("/proc/net/rpc/nfsd.export/channel", O_WRONLY);
 	if (fd < 0)
 		return 0;
-	n = nfsd_path_write(fd, buf, strlen(buf));
+	n = write(fd, buf, strlen(buf));
 	close(fd);
 	if (n < 0)
 		return 0;
support/include/nfsd_path.h +0 -3
index f600fb5a..f43040d5 100644
@@ -24,9 +24,6 @@ int		nfsd_path_statfs(const char *pathname,
 
 char *		nfsd_realpath(const char *path, char *resolved_path);
 
-ssize_t		nfsd_path_read(int fd, void* buf, size_t len);
-ssize_t		nfsd_path_write(int fd, void* buf, size_t len);
-
 int		nfsd_name_to_handle_at(int fd, const char *path,
 				       struct file_handle *fh,
 				       int *mount_id, int flags);
support/misc/nfsd_path.c +0 -49

55 lines not on this page · raw message

Signature · 1 line
2.48.0