Skip to contentSkip to conversation

NFS: Use nfs_server_capable() for checknig NFS_CAP_SEEK

PATCH New Anna Schumaker 1 participant 1 message Oct 23, 2014

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

PATCH 1/1 NFS: Use nfs_server_capable() for checknig NFS_CAP_SEEK

This should make the code easier to maintain in the future.

---
 fs/nfs/nfs42proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfs42proc.c +1 -1
index 0886f1d..056f5aa 100644
@@ -50,7 +50,7 @@ loff_t nfs42_proc_llseek(struct file *filep, loff_t offset, int whence)
 	struct nfs_server *server = NFS_SERVER(inode);
 	int status;
 
-	if (!(server->caps & NFS_CAP_SEEK))
+	if (!nfs_server_capable(inode, NFS_CAP_SEEK))
 		return -ENOTSUPP;
 
 	status = nfs42_set_rw_stateid(&args.sa_stateid, filep, FMODE_READ);
Signature · 1 line
2.1.2