ocfs2: add comments on ocfs2_do_flock()
PATCH 1/1 ocfs2: add comments on ocfs2_do_flock()
This patch adds a comment to explain when file is locked and F_SETLKW is set, -EWOULDBLOCK should be returned other than -EAGAIN.
It helps the code to be more understandable.
Signed-off-by Coly Li <[email protected]>
--- fs/ocfs2/locks.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/locks.c +3 -0
@@ -75,6 +75,9 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode, ret =ocfs2_file_lock (file, level, trylock);if (ret) { +/* The file is locked and the F_SETLKW +* flag is NOT set in cmd. +*/ if (ret == -EAGAIN && trylock) ret = -EWOULDBLOCK ;else
Signature · 2 lines
Coly Li SuSE PRC Labs