Whamcloud - gitweb
LU-3517 llite: don't check for O_CREAT in it_create_mode 86/6786/5
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 1 Jul 2013 17:26:15 +0000 (12:26 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 26 Jul 2013 17:57:15 +0000 (17:57 +0000)
commit0df1a34ae0b754a8a99d6a2b32637dd3c37108e2
treef5e7754452bbc426777c72c2f0fff8846aab1d7a
parent69f000d420d01c48fb7300ff973e498f2dbf92b5
LU-3517 llite: don't check for O_CREAT in it_create_mode

ll_lookup_it() checks for O_CREAT in struct lookup_intent's
it_create_mode member which is nonsensical, as it_create_mode is used
for file mode bits (S_IFREG, S_IRUSR, ...). Fix this by just checking
for IT_CREATE in it_op and do the same in llu_lookup_it(). This will
not affect the behavior of either function, since if O_CREATE (0100)
is actually set in o_create_mode then IT_CREATE must have been set in
it_op. In ll_atomic_open() check for O_CREAT in the open_flags
parameter rather than testing mode.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I301964222ec043e6f0cc3b000678fe3c881a2381
Reviewed-on: http://review.whamcloud.com/6786
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/liblustre/namei.c
lustre/llite/namei.c