It serves no purpose, we never explicitly unlock it, and it causes
needless failures if the firmware file happens to be on a filesystem
that does not support file locks.
Cc: Dave Jiang <dave.jiang(a)intel.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
ndctl/update.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/ndctl/update.c b/ndctl/update.c
index 4ca6a0d0f744..0f0f0d8172c4 100644
--- a/ndctl/update.c
+++ b/ndctl/update.c
@@ -470,12 +470,6 @@ static int verify_fw_file(struct update_context *uctx)
if (uctx->fw_fd < 0)
return -errno;
- rc = flock(uctx->fw_fd, LOCK_EX | LOCK_NB);
- if (rc < 0) {
- rc = -errno;
- goto cleanup;
- }
-
if (fstat(uctx->fw_fd, &st) < 0) {
rc = -errno;
goto cleanup;