diff for duplicates of <20120620223754.GA5864@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 789c09e..bfd6b30 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,14 +2,14 @@ On Tue, Jun 19, 2012 at 10:00:36AM +0800, Ming Lei wrote: > On Tue, Jun 19, 2012 at 6:25 AM, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > -> > Have you read Documentation/stable_kernel_patches.txt? Please do so and +> > Have you read Documentation/stable_kernel_patches.txt? �Please do so and > > I haven't read Documentation/stable_kernel_patches.txt, but read > Documentation/stable_kernel_rules.txt, :-) Sorry, you are correct :) -> > see why I can't take this patch for a stable tree. Note that no one has +> > see why I can't take this patch for a stable tree. �Note that no one has > > ever reported this as a bug before, and the original poster ran away > > never to be heard from again, so I really don't think it was a real > > problem that people ever saw. @@ -30,39 +30,39 @@ before. > >> >> Signed-off-by: Ming Lei <ming.lei@canonical.com> > >> >> --- > >> >> v2: -> >> >> - take Alan's suggestion to use device_trylock to avoid -> >> >> hanging during shutdown by buggy device or driver -> >> >> - hold parent reference counter +> >> >> � � � - take Alan's suggestion to use device_trylock to avoid +> >> >> � � � hanging during shutdown by buggy device or driver +> >> >> � � � - hold parent reference counter > >> >> -> >> >> drivers/base/core.c | 32 ++++++++++++++++++++++++++++++++ -> >> >> 1 file changed, 32 insertions(+) +> >> >> �drivers/base/core.c | � 32 ++++++++++++++++++++++++++++++++ +> >> >> �1 file changed, 32 insertions(+) > >> >> > >> >> diff --git a/drivers/base/core.c b/drivers/base/core.c > >> >> index 346be8b..f2fc989 100644 > >> >> --- a/drivers/base/core.c > >> >> +++ b/drivers/base/core.c > >> >> @@ -1796,6 +1796,16 @@ out: -> >> >> } -> >> >> EXPORT_SYMBOL_GPL(device_move); +> >> >> �} +> >> >> �EXPORT_SYMBOL_GPL(device_move); > >> >> > >> >> +static int __try_lock(struct device *dev) > >> >> +{ -> >> >> + int i = 0; +> >> >> + � � int i = 0; > >> >> + -> >> >> + while (!device_trylock(dev) && i++ < 100) -> >> >> + msleep(10); +> >> >> + � � while (!device_trylock(dev) && i++ < 100) +> >> >> + � � � � � � msleep(10); > >> >> + -> >> >> + return i < 100; +> >> >> + � � return i < 100; > >> >> +} > >> > > >> > That's a totally arbritary time, why does this work and other times do -> >> > not? And what is this returning, if the lock was grabbed successfully? +> >> > not? �And what is this returning, if the lock was grabbed successfully? > >> -> >> It is a timeout time and is 1sec now. If the lock can't be held in 1sec, the -> >> function will return 0, otherwise it will return 1 and indicates that the lock -> >> has been held successfully. +> >> �It is a timeout time and is 1sec now. If the lock can't be held in 1sec, the +> >> �function will return 0, otherwise it will return 1 and indicates that the lock +> >> �has been held successfully. > > -> > My point is why 1 second? That's completly arbitrary and means nothing. +> > My point is why 1 second? �That's completly arbitrary and means nothing. > > 1 second is a estimated value, just like many other timeout values in kernel. > diff --git a/a/content_digest b/N1/content_digest index 0e6cb29..366c5f6 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -17,14 +17,14 @@ "> On Tue, Jun 19, 2012 at 6:25 AM, Greg Kroah-Hartman\n" "> <gregkh@linuxfoundation.org> wrote:\n" "> \n" - "> > Have you read Documentation/stable_kernel_patches.txt? \302\240Please do so and\n" + "> > Have you read Documentation/stable_kernel_patches.txt? \303\257\302\277\302\275Please do so and\n" "> \n" "> I haven't read Documentation/stable_kernel_patches.txt, but read\n" "> Documentation/stable_kernel_rules.txt, :-)\n" "\n" "Sorry, you are correct :)\n" "\n" - "> > see why I can't take this patch for a stable tree. \302\240Note that no one has\n" + "> > see why I can't take this patch for a stable tree. \303\257\302\277\302\275Note that no one has\n" "> > ever reported this as a bug before, and the original poster ran away\n" "> > never to be heard from again, so I really don't think it was a real\n" "> > problem that people ever saw.\n" @@ -45,39 +45,39 @@ "> >> >> Signed-off-by: Ming Lei <ming.lei@canonical.com>\n" "> >> >> ---\n" "> >> >> v2:\n" - "> >> >> \302\240 \302\240 \302\240 - take Alan's suggestion to use device_trylock to avoid\n" - "> >> >> \302\240 \302\240 \302\240 hanging during shutdown by buggy device or driver\n" - "> >> >> \302\240 \302\240 \302\240 - hold parent reference counter\n" + "> >> >> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 - take Alan's suggestion to use device_trylock to avoid\n" + "> >> >> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 hanging during shutdown by buggy device or driver\n" + "> >> >> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 - hold parent reference counter\n" "> >> >>\n" - "> >> >> \302\240drivers/base/core.c | \302\240 32 ++++++++++++++++++++++++++++++++\n" - "> >> >> \302\2401 file changed, 32 insertions(+)\n" + "> >> >> \303\257\302\277\302\275drivers/base/core.c | \303\257\302\277\302\275 32 ++++++++++++++++++++++++++++++++\n" + "> >> >> \303\257\302\277\302\2751 file changed, 32 insertions(+)\n" "> >> >>\n" "> >> >> diff --git a/drivers/base/core.c b/drivers/base/core.c\n" "> >> >> index 346be8b..f2fc989 100644\n" "> >> >> --- a/drivers/base/core.c\n" "> >> >> +++ b/drivers/base/core.c\n" "> >> >> @@ -1796,6 +1796,16 @@ out:\n" - "> >> >> \302\240}\n" - "> >> >> \302\240EXPORT_SYMBOL_GPL(device_move);\n" + "> >> >> \303\257\302\277\302\275}\n" + "> >> >> \303\257\302\277\302\275EXPORT_SYMBOL_GPL(device_move);\n" "> >> >>\n" "> >> >> +static int __try_lock(struct device *dev)\n" "> >> >> +{\n" - "> >> >> + \302\240 \302\240 int i = 0;\n" + "> >> >> + \303\257\302\277\302\275 \303\257\302\277\302\275 int i = 0;\n" "> >> >> +\n" - "> >> >> + \302\240 \302\240 while (!device_trylock(dev) && i++ < 100)\n" - "> >> >> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 msleep(10);\n" + "> >> >> + \303\257\302\277\302\275 \303\257\302\277\302\275 while (!device_trylock(dev) && i++ < 100)\n" + "> >> >> + \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 msleep(10);\n" "> >> >> +\n" - "> >> >> + \302\240 \302\240 return i < 100;\n" + "> >> >> + \303\257\302\277\302\275 \303\257\302\277\302\275 return i < 100;\n" "> >> >> +}\n" "> >> >\n" "> >> > That's a totally arbritary time, why does this work and other times do\n" - "> >> > not? \302\240And what is this returning, if the lock was grabbed successfully?\n" + "> >> > not? \303\257\302\277\302\275And what is this returning, if the lock was grabbed successfully?\n" "> >>\n" - "> >> \302\240It is a timeout time and is 1sec now. If the lock can't be held in 1sec, the\n" - "> >> \302\240function will return 0, otherwise it will return 1 and indicates that the lock\n" - "> >> \302\240has been held successfully.\n" + "> >> \303\257\302\277\302\275It is a timeout time and is 1sec now. If the lock can't be held in 1sec, the\n" + "> >> \303\257\302\277\302\275function will return 0, otherwise it will return 1 and indicates that the lock\n" + "> >> \303\257\302\277\302\275has been held successfully.\n" "> >\n" - "> > My point is why 1 second? \302\240That's completly arbitrary and means nothing.\n" + "> > My point is why 1 second? \303\257\302\277\302\275That's completly arbitrary and means nothing.\n" "> \n" "> 1 second is a estimated value, just like many other timeout values in kernel.\n" "> \n" @@ -116,4 +116,4 @@ "\n" greg k-h -49fe629738e5052dbb15848f9881828f2e438f1fc430ce504c269b445eea063a +025496b4e91b841f5fb6d4b2ad7020e620c29cb9e082ef068a0f771bcf040526
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.