fs/nfs/direct.c: remove dead code
PATCH 1/1 fs/nfs/direct.c: remove dead code
This code became dead after commit b9148c6b80d802dbc2a7530b29915a80432e50c7 (which BTW doesn't seem to have changed any behaviour) and can therefore be removed.
Spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
---
fs/nfs/direct.c renamed from fs/nfs/direct.c.old +0 -3
@@ -897,15 +897,12 @@ ssize_t nfs_file_direct_write(struct kioif (!count) goto out;/* return 0 */ retval = -EINVAL ;if ((ssize_t ) count <0 ) goto out; - retval =0 ; -if (!count) - goto out; retval =nfs_sync_mapping (mapping);if (retval) goto out; retval =nfs_direct_write (iocb, iov, nr_segs, pos, count);
commit b9148c6b should be reverted. It was recently forward-ported from some years-old patches, and is clearly not needed now.
Quoted 18 lines · Adrian Bunk
This code became dead after commit
b9148c6b80d802dbc2a7530b29915a80432e50c7(which BTW doesn't seem to have changed any behaviour) and can therefore be removed.Spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>---
fs/nfs/direct.c renamed from fs/nfs/direct.c.old +0
-0@@ -897,15 +897,12 @@ ssize_t nfs_file_direct_write(struct kioif (!count) goto out;/* return 0 */ retval = -EINVAL ;if ((ssize_t ) count <0 )
fs/nfs/direct.c ssize_t nfs_file_direct_write(struct kio · line 908
Quoted 10 lines
fs/nfs/direct.c renamed from fs/nfs/direct.c.old +0
-3goto out; - retval =0 ; -if (!count) - goto out; retval =nfs_sync_mapping (mapping);if (retval) goto out; retval =nfs_direct_write (iocb, iov, nr_segs, pos, count);
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com