Commit a3056ac5 authored by Trond Myklebust's avatar Trond Myklebust

Subject: [PATCH] NFS: Use sizeof() instead of C macro

 Replace a C macro with sizeof().
Signed-off-by: default avatarChuck Lever <cel@netapp.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
parent 1d809e4d
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define NFSDBG_FACILITY NFSDBG_VFS #define NFSDBG_FACILITY NFSDBG_VFS
#define VERF_SIZE (2 * sizeof(__u32))
#define MAX_DIRECTIO_SIZE (4096UL << PAGE_SHIFT) #define MAX_DIRECTIO_SIZE (4096UL << PAGE_SHIFT)
...@@ -303,11 +302,11 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx, ...@@ -303,11 +302,11 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx,
if (tot_bytes == 0) if (tot_bytes == 0)
memcpy(&first_verf.verifier, &wdata.verf.verifier, memcpy(&first_verf.verifier, &wdata.verf.verifier,
VERF_SIZE); sizeof(first_verf.verifier));
if (wdata.verf.committed != NFS_FILE_SYNC) { if (wdata.verf.committed != NFS_FILE_SYNC) {
need_commit = 1; need_commit = 1;
if (memcmp(&first_verf.verifier, if (memcmp(&first_verf.verifier, &wdata.verf.verifier,
&wdata.verf.verifier, VERF_SIZE)) sizeof(first_verf.verifier)));
goto sync_retry; goto sync_retry;
} }
...@@ -331,8 +330,8 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx, ...@@ -331,8 +330,8 @@ nfs_direct_write_seg(struct inode *inode, struct nfs_open_context *ctx,
unlock_kernel(); unlock_kernel();
if (result < 0 || memcmp(&first_verf.verifier, if (result < 0 || memcmp(&first_verf.verifier,
&wdata.verf.verifier, &wdata.verf.verifier,
VERF_SIZE) != 0) sizeof(first_verf.verifier)) != 0)
goto sync_retry; goto sync_retry;
} }
result = tot_bytes; result = tot_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment