Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507945
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [GIT PULL] xen: xenfs fixes for 4.9-rc2 |
| Date | 2016-10-25 05:30 +0200 |
| Message-ID | <sw0B4-8rP-9@gated-at.bofh.it> (permalink) |
| References | <svQs2-1GJ-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Oct 24, 2016 at 9:37 AM, David Vrabel <dvrabel@cantab.net> wrote:
>
> I think the changes are trivial and uncontroversial.
Hmm. Sadly, they are also buggy.
This:
if (files->mode & S_IFLNK) {
is simply wrong. The correct test for S_IFLNK is to do
if ((files->mode & S_IFMT) == S_IFLNK) {
and quite frankly, the right model is almost certainly to just do a
switch-statement that does something like
switch (files->mode & S_IFMT) {
case S_IFLNK:
...
case S_IFREG:
case 0:
....
default:
..error..
because maybe somebody wants to add other cases later (and even if
not, it's just wrong to randomly change any other mode into S_IFREG).
And while I could easily do an evil merge and fix that part up, I
really don't want to do things like that. So I'm not going to pull
this.
Linus
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[GIT PULL] xen: xenfs fixes for 4.9-rc2 David Vrabel <dvrabel@cantab.net> - 2016-10-24 18:40 +0200 Re: [GIT PULL] xen: xenfs fixes for 4.9-rc2 Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-25 05:30 +0200
csiph-web